Skip to content

fix(honeydew): read and write flat semantic model documents - #420

Open
baruchoxman wants to merge 1 commit into
apache:mainfrom
honeydew-ai:honeydew-flat-schema
Open

baruchoxman wants to merge 1 commit into
apache:mainfrom
honeydew-ai:honeydew-flat-schema

Conversation

@baruchoxman

@baruchoxman baruchoxman commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Part of #418, for converters/honeydew. #383 moved the Ossie document schema to a single semantic model at the document root, and #397 dropped root-level dialects/vendors. This converter still required the semantic_model: [...] wrapper, so it could not read any current Ossie document — including examples/tpcds_semantic_model.yaml, which its own round-trip test loads. Its CI has not re-triggered since #383, so the break has been latent: test_ossie_roundtrip_tpcds_example is red on main today.

What changed

  • Ossie → Honeydew: read the model from the document root; removed the wrapper handling and the multi-model warning (a document now holds exactly one model). A document that still carries the legacy wrapper gets an explicit error telling the author to move the model's properties up to the root, rather than a confusing "missing name".
  • Honeydew → Ossie: emit version plus the model's properties at the root, with no wrapper.
  • Dropped the vendors round-trip: root-level vendors no longer exists in the schema, and the root is now additionalProperties: false, so emitting it made the output invalid. This also removes the extra_vendors plumbing through the ossie metadata section and the test_vendors_roundtrip case that covered it.
  • README: the mapping tables now name name at the document root instead of semantic_model.name.
  • Tests: helpers build and assert the flat shape; added a case asserting the legacy wrapper is rejected with the migration message.

Verification

The TPC-DS round-trip now works end to end, and its output validates against the official schema — the converter's first output that the validator has ever accepted since #383:

$ uv run ossie-honeydew ossie-to-honeydew -i examples/tpcds_semantic_model.yaml -o /tmp/hd_ws
Wrote 20 file(s) to /tmp/hd_ws
$ uv run ossie-honeydew honeydew-to-ossie -i /tmp/hd_ws -o /tmp/roundtrip.yaml
$ python3 validation/validate.py /tmp/roundtrip.yaml
Validation PASSED: roundtrip.yaml

Test plan

  • cd converters/honeydew && uv sync && uv run pytest — 126 passed (128 on main, of which 1 failed; net −3 test_vendors_roundtrip params, +1 legacy-wrapper case)
  • test_ossie_roundtrip_tpcds_example passes, having been red on main
  • python3 validation/validate.py accepts the round-tripped TPC-DS document

🤖 Generated with Claude Code

apache#383 moved the Ossie document schema to a single semantic model defined
directly at the document root, and apache#397 dropped root-level `dialects` and
`vendors`. The Honeydew converter still required the `semantic_model: [...]`
wrapper, so it could not read any current Ossie document — including the
TPC-DS example, which its own round-trip test loads.

Read the model from the document root, emit `version` plus the model's
properties with no wrapper, and drop the `vendors` round-trip (the field no
longer exists in the schema, and `additionalProperties: false` now rejects
it). A document that still carries the legacy wrapper gets an error that
says how to migrate it.

The dropped multi-model warning has no meaning now that a document holds
exactly one model.

Part of apache#418

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@baruchoxman

Copy link
Copy Markdown
Contributor Author

@jbonofre would appreciate you taking a look

@jbonofre
jbonofre self-requested a review September 18, 2026 13:02
@jbonofre

Copy link
Copy Markdown
Member

@baruchoxman absolutely. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants