Repository navigation
Pin the canonical context IRI and move to the stable namespace - #8
Merged
Merged
Conversation
Records may only reference the canonical context IRI https://sourcelume.apache.org/context/0.0.1/sourcelume.jsonld. The JSON Schema rejects inline @context objects and other IRIs, so the meaning of a record is fixed by the published context. The term namespace moves from /ns/0.0.1# to the stable /ns#; the context URL stays versioned. tools/validate.py resolves the canonical context from the bundled copy instead of fetching it. Apache-ai: Yes Generated-by: pi (claude-haiku-5-5) Reviewed-by: anierbeck
jgoodyear
pushed a commit
that referenced
this pull request
Oct 11, 2026
* Add optional contentCreatedEnd for content created over a period 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 * Require @context and assert the record type survives expansion 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Pins the canonical context IRI for 0.0.1 and moves the term namespace to the stable
https://sourcelume.apache.org/ns#. Follows the dev-list discussion "Canonical IRI for the Sourcelume JSON-LD context, and pinning it" (11 Oct).https://sourcelume.apache.org/context/0.0.1/sourcelume.jsonldand nothing else. The JSON Schema enforces this withconst, so inline@contextobjects and other hosts are rejected.sl:moves from/ns/0.0.1#to/ns#in the context and the SHACL shapes. The context URL stays versioned, so the term IRIs are the same in every spec version.tools/validate.pyresolves the canonical context from the bundled copy instead of fetching it, so validation stays offline.Not in this PR
Verification
uv run python -m unittest discover -s tests: 6 tests pass, including new negative tests for inline and foreign context IRIs and a check that the schema constant equalsvalidate.CANONICAL_CONTEXT_IRI.https://sourcelume.apache.org/ns#ProvenanceRecord.uv run python tools/validate.pyruns clean (no examples onmainyet).Note for the registry
The registry CI checks out this repo's
main. Its validator constant (ShaclRecordValidator.PROVENANCE_RECORD_CLASS) and its context check need the same change once this is merged.Apache-ai: Yes
Generated-by: pi (claude-haiku-5-5)
Reviewed-by: anierbeck