Repository navigation
Add contentCreatedEnd and require @context (follow-up to #8) - #9
Merged
Merged
Conversation
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
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.
Follow-up to #8, which was merged before these two changes were pushed to its branch.
Add optional
contentCreatedEnd(d7f8404)contentCreatedcould only hold one point in time and told authors to use the start of a period, which dropped the end.contentCreatedEndis an optional companion:contentCreatedstays 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
@contextand assert the record type survives expansion (0855fe7)Review findings on #8:
@contextis nowrequired. Theconstonly applies when the key is present, andtools/validate.pyinjects the local context, so a record without@contextpassed the command line check although other JSON-LD processors cannot expand it.rdf:type sl:ProvenanceRecordin the expanded graph. Without a focus node the SHACL shapes pass vacuously. I checked that the assertion fails with the old namespace.Verification
uv run python -m unittest discover -s tests: 11 tests pass.Not in this PR
Apache-ai: Yes
Generated-by: pi (claude-sonnet-5-5)
Reviewed-by: anierbeck