Repository navigation
Baseline runtime metadata, schemas, and validation - #2
Merged
Merged
Conversation
Implements the P0 roadmap item that baselines the reference runtime, and records the vector composition work with the identities its provider already publishes. Add JSON Schema definitions for the three machine-readable documents this repository produces: runtime metadata, committed release evidence, and the generated acceptance report. Generate runtime-metadata.windows.json from committed inputs only, and validate every committed document, the manifest and lock agreement, and the identities repeated in prose from one entry point that both workflows call. The acceptance report gains a version-independent shape: complete replaces full_v0_1_0_acceptance, checks replaces commands, and a tier2 verification failure now marks its own check failed. Validation needs only CPython 3.13. jsonschema_lite implements the keyword subset these schemas use and raises on any unsupported keyword, so a schema cannot silently stop being enforced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Release evidence is now rejected when any recorded check failed; only the top-level status was checked, so a record could name a failed probe and still validate. jsonschema_lite walks the whole schema before validating, so an unsupported keyword under an optional property is no longer silently unenforced, and const/enum stop treating true as 1. The acceptance report gains an explicit verification field. A probe that exits zero but fails its derived verification now records both facts rather than a failed status next to exit_code 0, and an exception with no message no longer writes an empty error that violates the report schema. A missing tier2 baseline raises a described failure instead of a bare StopIteration. Also: a tag-pinned artifact source now raises a diagnostic instead of an IndexError, an unreadable lock degrades into a reported failure instead of aborting the run, the release workflow selects evidence by its release field rather than a filename convention and no longer hardcodes the windows slug, and the test runner reports unexpected exceptions instead of stopping at the first one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Implements the P0 roadmap item that baselines the reference runtime, and rewrites the vector priority around the identities its provider already publishes.
Schemas
schemas/defines the three machine-readable documents this repository produces:runtime-metadata.v1.json— canonical target identity, immutable identities, components, and capability providers for one composed target.release-evidence.v1.json— the immutable acceptance result committed per released target. It requires each acceptance check and the measurements that make the claim auditable, and it accepts the existingv0.1.0record unchanged.acceptance-report.v1.json— the generated reporttools/accept.pywrites.Generated runtime metadata
runtime-metadata.windows.jsonis generated bytools/runtime_metadata.pyfrom committed inputs only — the manifest, its lock, and the newest accepted evidence for the same target. It decomposes the canonical target string, joins every resolved component and capability to its OpenStrata and OCI digests, and derives whether a Python interpreter is bundled from the lock's install list rather than asserting it. Nothing in it is hand entered.One validation entry point
tools/validate_metadata.pyreplaces the inline Python in both workflows and fails when:README.mdor a release record no longer matches the generated one;tools/accept.pywould emit a report that does not match its schema.--release <tag>additionally gatesVERSION, the release record, and evidence for that tag.Acceptance report shape
The report loses its version-specific field names:
completereplacesfull_v0_1_0_acceptanceandchecksreplacescommands. A tier2 verification failure now marks thetier2check failed instead of only failing the run. Probe execution is unchanged.No dependencies
tools/jsonschema_lite.pyimplements the keyword subset these schemas use and raises on any unsupported keyword, so a schema cannot silently stop being enforced. CI installs no packages.Tests
tests/tooling/test_metadata_tools.py(9 tests) is negative-case first: malformed digests, a missing required check, non-canonical targets, an unsupported schema keyword, tier2 evidence that should be rejected, a stale README locator, and evidence that contradicts the lock. CI runs it next to the validator.Documentation
docs/reference/acceptance-contract.md(implemented checks, generated report, committed evidence shape) anddocs/design/composition-layout.md(proposed target-aware layout, with the digest-stability condition that decides whether the move is a relocation or a release).docs/roadmap/current.mddrops the completed P0 and rewrites the vector priority aroundusd-vector-pluginsv0.1.0, which already declaresusd-fileformat:geojsonand requires only capabilities this composition resolves. The remaining blockers are recorded as such: the product has no published OCI locator yet, its provenance records verification against a different OpenUSD runtime artifact than this composition pins, and it installs no acceptance probe undershare/.Verification
python tools/validate_metadata.py --release v0.1.0passes all 46 checks andpython tests/tooling/test_metadata_tools.pypasses 9 of 9. Committed release evidence and the v0.1.0 release record are untouched.🤖 Generated with Claude Code