Skip to content

spec: a term mapped with @reverse is reference-valued - #181

Merged
simontaurus merged 1 commit into
mainfrom
fix/reverse-term-reference-signal
Sep 21, 2026
Merged

simontaurus merged 1 commit into
mainfrom
fix/reverse-term-reference-signal

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

OOLD-EXT-6d10 listed three signals for a reference-valued property: x-oold-range, an IRI-family format, and a term mapped "@type": "@id".

A term mapped with @reverse is reference-valued too, but matched only if the author also wrote "@type": "@id" - which [[JSON-LD11]] §4.1.10 makes redundant, since a reverse term's values are node references by definition. Measured before the fix:

bare @reverse        -> referenceProperties: []            frame: undefined
@reverse + @type @id -> referenceProperties: ["employees"] frame: {"@embed":"@never"}

So a schema using the idiomatic spelling got no @embed: @never, and framing embedded the reverse targets: exactly the defect #160 closed, reachable again through the gap. Every fixture passed because the worked example in #framing writes both spellings.

Changes

  • OOLD-EXT-6d10 takes a fourth signal, @reverse, and says why it stands alone.
  • #reverse-properties now states the plain [[JSON-LD11]] mechanism. The specification used @reverse in three worked examples but only ever defined x-oold-reverse-properties, leaving the distinction - read projection versus editor affordance - in a parenthetical. Prose rather than rules: the permission is a MAY, which the catalogue deliberately excludes, and the obligation already lives in OOLD-EXT-6d10.

Implementations

OO-LD/oold-js#4 and OO-LD/oold-python#164, each with a test on the bare form.

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

OOLD-EXT-6d10 listed three signals; a reverse term matched only when the
author also wrote "@type": "@id", which JSON-LD makes redundant. Both
implementations therefore embedded the targets of a bare @reverse term,
the defect #160 closed.

Also states plain @reverse itself: the specification used it in three
worked examples but only ever defined x-oold-reverse-properties, so the
distinction between a read projection and the editor affordance sat in a
parenthetical.
@simontaurus
simontaurus merged commit f5f435f into main Sep 21, 2026
3 checks passed
@simontaurus
simontaurus deleted the fix/reverse-term-reference-signal branch September 21, 2026 04:54
simontaurus added a commit to OO-LD/oold-js that referenced this pull request Sep 21, 2026
A reverse term's values are node references by definition, so "@type":
"@id" beside it is redundant and authors omit it. Keying only on @type
missed the idiomatic spelling, and framing embedded the targets.

Refs OO-LD/oold-schema#181
simontaurus added a commit to OO-LD/oold-python that referenced this pull request Sep 21, 2026
A reverse term's values are node references by definition, so "@type":
"@id" beside it is redundant and authors omit it. Keying only on @type
missed the idiomatic spelling, and framing embedded the targets.

Refs OO-LD/oold-schema#181
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