Skip to content

Add contentCreatedEnd and require @context (follow-up to #8) - #9

Merged
jgoodyear merged 2 commits into
mainfrom
spec-followup
Oct 11, 2026
Merged

jgoodyear merged 2 commits into
mainfrom
spec-followup

Conversation

@ANierbeck

Copy link
Copy Markdown
Contributor

Follow-up to #8, which was merged before these two changes were pushed to its branch.

Add optional contentCreatedEnd (d7f8404)

contentCreated could only hold one point in time and told authors to use the start of a period, which dropped the end. contentCreatedEnd is an optional companion: contentCreated stays the start of the period, so existing records remain valid. The SHACL shapes reject an end before the start. This came out of a contributor's review on Slack and is a separate commit, so it is easy to drop if the list does not want it.

Checked with pyshacl and with Jena SHACL, which the registry uses: a period, no end, and an end before the start behave the same in both.

Require @context and assert the record type survives expansion (0855fe7)

Review findings on #8:

  • @context is now required. The const only applies when the key is present, and tools/validate.py injects the local context, so a record without @context passed the command line check although other JSON-LD processors cannot expand it.
  • The valid-record test asserts rdf:type sl:ProvenanceRecord in the expanded graph. Without a focus node the SHACL shapes pass vacuously. I checked that the assertion fails with the old namespace.
  • The context section no longer claims the file is already served at the canonical address.

Verification

uv run python -m unittest discover -s tests: 11 tests pass.

Not in this PR

  • Hosting the context at the canonical URL (sourcelume-site).
  • The other vocabulary points from the Slack review (origin IRI, action vocabulary, license structure, dct vs. schema), which are on the dev-list thread.

Apache-ai: Yes
Generated-by: pi (claude-sonnet-5-5)
Reviewed-by: anierbeck

contentCreated could only hold one point in time and told authors to
use the start of a period, which dropped the end. contentCreatedEnd is
an optional companion: contentCreated stays the start of the period, so
existing records remain valid.

The SHACL shapes reject an end that lies before the start. The same
shapes were checked with pyshacl and with Jena SHACL, which the
registry uses.

Apache-ai: Yes
Generated-by: pi (claude-haiku-5-5)
Reviewed-by: anierbeck
Review findings on the canonical context change:

- @context is now a required property. The const only applies when the
  key is present, and tools/validate.py injects the local context, so a
  record without @context used to pass the command line check although
  other JSON-LD processors cannot expand it.
- The valid-record test asserts that the expanded graph contains
  rdf:type sl:ProvenanceRecord. Without a focus node the SHACL shapes
  pass vacuously; the assertion fails if the namespace and the shapes
  drift apart.
- The context section no longer claims the file is already served at the
  canonical address; the release process publishes it.

Apache-ai: Yes
Generated-by: pi (claude-sonnet-5-5)
Reviewed-by: anierbeck
@jgoodyear
jgoodyear merged commit ce1417d into main Oct 11, 2026
2 checks passed
@jgoodyear
jgoodyear deleted the spec-followup branch October 11, 2026 16:54
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