Skip to content

Migrate TRACE TROs to canonical TROv 0.1 namespace#314

Merged
MaxGhenis merged 2 commits intomainfrom
migrate-trov-namespace-canonical
Apr 21, 2026
Merged

Migrate TRACE TROs to canonical TROv 0.1 namespace#314
MaxGhenis merged 2 commits intomainfrom
migrate-trov-namespace-canonical

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • Replaces https://w3id.org/trace/2023/05/trov# (prerelease TROv) with https://w3id.org/trace/trov/0.1# (canonical) in the TRO emitter, the TRO JSON-LD schema, the tests, and the release-bundles docs.
  • policyengine-us-data already emits TROs under the canonical namespace (Publish TRACE TRO declarations for US data releases policyengine-us-data#746). Before this PR, the two sides couldn't share SHACL validators. After this PR, a TRO emitted by either side validates against the same TROv 0.1 vocabulary.

Testing

  • uv run pytest tests/test_trace_tro.py -q → 36 passed
  • uv run pytest tests/ -q --ignore=tests/integration → 435 passed
  • uv run ruff format / uv run ruff check clean

Follow-ups

Fixes #313.

🤖 Generated with Claude Code

Switches the TROv vocabulary URI emitted in TRACE Transparent Research
Objects from the prerelease 2023/05 namespace to the canonical
https://w3id.org/trace/trov/0.1# URI. policyengine-us-data has emitted
TROs under TROv 0.1 since #746, so the two sides can now share SHACL
validators and TROs from either side validate against the same
vocabulary without manual rewrite.

Touched: src/policyengine/provenance/trace.py (constant + module
docstring), src/policyengine/data/schemas/trace_tro.schema.json (the
@context.trov const), tests/test_trace_tro.py (literal assertion),
and docs/release-bundles.md (the documented URI).

All 435 non-integration tests pass; the 36 TRACE tests in particular
confirm schema-level validation still accepts the new URI.

Fixes #313.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/household-api-docs that referenced this pull request Apr 21, 2026
Pairs with PolicyEngine/policyengine.py#314 which migrates the
emitted TROv vocabulary URI from the prerelease 2023/05 namespace
to the canonical 0.1 namespace. Landing both together keeps the
docs consistent with what policyengine.py actually emits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit ea26699 into main Apr 21, 2026
12 checks passed
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.

Migrate TRACE TROs from prerelease 2023/05 vocabulary to canonical TROv 0.1

1 participant