Skip to content

spec: state the frame derivation's reference signals and the graph reading - #174

Merged
simontaurus merged 1 commit into
mainfrom
spec/framing-reference-signals
Sep 19, 2026
Merged

simontaurus merged 1 commit into
mainfrom
spec/framing-reference-signals

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

Closes #160.

OOLD-EXT-68fa already required @embed: @never for reference-valued properties, and the worked example already printed it, but the text never said which properties are reference-valued. Both reference implementations emitted @embed: @once and no subframe at all, so both were in breach of an existing MUST.

Measured, not assumed: framing a Person schema whose works_for is {"type": "string", "format": "iri-reference"} against a graph where the employer carries its own rdf:type and schema:name returns an object in that position, and the framed document then fails Ajv validation against the schema the frame was derived from.

Rules added

  • OOLD-EXT-6d10 (MUST) - a property is reference-valued on any of three signals: x-oold-range on a string-typed value, an IRI-family format, or a term mapped "@type": "@id".
  • OOLD-EXT-ff64 (MUST) - the embedded-object reading wins where a property matches both.
  • OOLD-EXT-05d3 (MUST NOT) - no subframe for a key aliasing a JSON-LD keyword. id conventionally carries "format": "iri" and so matches the reference signals, but a subframe there writes {"@id": {...}}, which a processor rejects. This one came out of the shared corpus while fixing the implementations, not from reading the text.
  • OOLD-EXT-725f (MUST) - framing a graph yields one instance document per matching node, and several documents merge back into one graph. @never is what makes the two directions consistent: an embedded reference would copy the target's triples into every document that mentions it. This is the framing-based answer to Object - Graph - Object Mappings #10.

Implementations

Fixed in lockstep, each with tests that fail when only the @never line is removed:

Verified

make spec, make validate (380 ok and 76 ok, 0 failed), rules_baseline.py check (88 rules), check_spec.py (54 sections).

…ading

- OOLD-EXT-6d10, ff64, 05d3: which signals make a property
  reference-valued, that an embedded object wins where both match, and
  that a key aliasing a JSON-LD keyword never gets a subframe
- OOLD-EXT-725f: framing a graph yields one document per matching node,
  and several documents merge back into one graph

Both implementations emitted @embed @once and so breached OOLD-EXT-68fa;
a reference whose target carried triples was embedded and the framed
document then failed the schema its frame came from.

Closes #160
@simontaurus
simontaurus merged commit 2d8cb63 into main Sep 19, 2026
3 checks passed
@simontaurus
simontaurus deleted the spec/framing-reference-signals branch September 19, 2026 13:51
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.

Framing: make the @embed:@never derivation testable and specify the many-documents-one-graph reading

1 participant