Skip to content

Support current Ossie profiles and preserve source semantics - #401

Merged
nicosuave merged 3 commits into
mainfrom
ossie-source-contract
Oct 2, 2026
Merged

nicosuave merged 3 commits into
mainfrom
ossie-source-contract

Conversation

@nicosuave

@nicosuave nicosuave commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Current flat Ossie documents could be missed by automatic CLI import, source serialization could reuse stale bytes after a JSON scalar-type change, and ontology references were not fully checked. This adds current logical/ontology profiles pinned to Apache Ossie b6c702e while preserving released and older-draft documents.

The source layer now preserves schema revisions and document shape, validates ontology identities/inheritance/roles/mappings, accepts YAML merge overrides without allowing authored duplicate keys, and bounds parser expansion. Synthesis preserves temporal roles and resolves native field placeholders; exact-source fallback produces a diagnostic. CLI conversion passes scope, dialect, import policy, and schema revision through to the Ossie APIs.

Local source/interchange/catalog/CLI validation: 672 passed. Ruff, formatting, and whitespace checks passed. Official schema/validator fixtures are pinned with provenance. Execution binding and aggregate-planner changes are in the following stack layers.

@nicosuave
nicosuave added this pull request to stack #404 October 2, 2026 13:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T13:19:46.079571Z d919c97 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nicosuave nicosuave changed the title Support current Ossie source profiles and lossless interchange Support current Ossie profiles and preserve source semantics Oct 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d919c97c31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sidemantic/loaders.py Outdated
Comment on lines +439 to +444
elif file_path.name.lower().endswith((".ossie.json", ".ossie.yaml", ".ossie.yml")):
# An explicit format suffix also routes malformed documents to the
# validated parser, so they cannot silently become an empty graph.
if _is_generated_artifact(file_path, directory):
continue
adapter = ossie_adapter()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve dbt profile detection for suffixed YAML

When auto-discovery sees a *.ossie.yaml or *.ossie.yml document using the supported dbt 0.1.0 compatibility version, this new early branch bypasses the YAML inspection below and constructs an ossie-core adapter. The parser consequently rejects the document because 0.1.0 requires dbt-1.12, whereas the previous YAML path selected that consumer automatically. Inspect valid suffixed YAML before choosing the default profile while retaining this branch for malformed documents. This affects default CLI discovery and validation workflows.

AGENTS.md reference: AGENTS.md:L5-L9

Useful? React with 👍 / 👎.

Comment thread sidemantic/loaders.py
Comment on lines 455 to 459
elif (
'"semantic_model"' in content
and '"datasets"' in content
and _is_under_osi_tree(file_path, directory)
'"datasets"' in content
and ('"semantic_model"' in content or ('"version"' in content and '"name"' in content))
and (only_file is not None or _is_under_osi_tree(file_path, directory))
and not _is_generated_artifact(file_path, directory)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Discover current JSON documents in directory mode

For a current flat Ossie document named ordinarily, such as models/commerce.json, directory loading leaves only_file unset and the file is ignored unless it resides under OSI/; the same document is recognized when loaded directly or serialized as YAML. The OSI/ restriction was designed for released dbt artifacts, but this condition now also matches the current version/name/datasets profile, so CLI-first commands such as sidemantic validate models/ can silently omit valid current JSON sources. Apply the OSI-tree restriction only to the legacy envelope or otherwise recognize current flat JSON during project scans.

AGENTS.md reference: AGENTS.md:L5-L9

Useful? React with 👍 / 👎.

@nicosuave
nicosuave merged commit 79e917b into main Oct 2, 2026
27 checks passed
@nicosuave
nicosuave deleted the ossie-source-contract branch October 2, 2026 18:17
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.

1 participant