Skip to content

fix(scripts): count a scoped @context term only where it is a property - #151

Merged
simontaurus merged 1 commit into
mainfrom
fix/mjs-scoped-term-not-a-property
Aug 27, 2026
Merged

fix(scripts): count a scoped @context term only where it is a property#151
simontaurus merged 1 commit into
mainfrom
fix/mjs-scoped-term-not-a-property

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

embeddedProperties in scripts/schema_to_frame.mjs took every @context term carrying a scoped @context, without checking that the schema declares a property of that name.

OOLD-CMP-b926 requires a schema to reflect every $ref in its @context, including $refs reached from $defs, so the root context carries terms for properties the root object never holds. Such a term made roundtrip choose framing over compaction and put an unmatchable property into the derived frame, so framing returned nothing and an unrelated property was reported lost. Full analysis in #149.

Same one-line condition as OO-LD/oold-python#135. Fixed here so the reference implementation stays in parity with oold-python and so the fix travels with validate.mjs into oold-js.

Not exercised by the compliance fixtures, which is why parity did not catch it.

Verification

make validate-reference: 149/149 checks passed, 1 warning (the known rule-coverage warning). Parity from oold-python against this branch: 6 passed.

Mirrors OO-LD/oold-python#135 so the reference implementation and oold-python
stay in parity, and so the fix travels with validate.mjs into oold-js.

Refs #149
@simontaurus
simontaurus merged commit 5168283 into main Aug 27, 2026
3 checks passed
@simontaurus
simontaurus deleted the fix/mjs-scoped-term-not-a-property branch August 27, 2026 03:32
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