Skip to content

Baseline runtime metadata, schemas, and validation - #2

Merged
snkmcb merged 2 commits into
mainfrom
feat/runtime-metadata-baseline
Sep 5, 2026
Merged

snkmcb merged 2 commits into
mainfrom
feat/runtime-metadata-baseline

Conversation

@snkmcb

@snkmcb snkmcb commented Sep 4, 2026

Copy link
Copy Markdown
Member

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 existing v0.1.0 record unchanged.
  • acceptance-report.v1.json — the generated report tools/accept.py writes.

Generated runtime metadata

runtime-metadata.windows.json is generated by tools/runtime_metadata.py from 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.py replaces the inline Python in both workflows and fails when:

  • a manifest and its lock disagree, a resolved component is unpinned, or a candidate artifact is unused;
  • an evidence record is not schema valid, contradicts the lock it claims, or has no release record;
  • the committed runtime metadata is stale;
  • an identity published in README.md or a release record no longer matches the generated one;
  • tools/accept.py would emit a report that does not match its schema.

--release <tag> additionally gates VERSION, the release record, and evidence for that tag.

Acceptance report shape

The report loses its version-specific field names: complete replaces full_v0_1_0_acceptance and checks replaces commands. A tier2 verification failure now marks the tier2 check failed instead of only failing the run. Probe execution is unchanged.

No dependencies

tools/jsonschema_lite.py implements 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

  • New: docs/reference/acceptance-contract.md (implemented checks, generated report, committed evidence shape) and docs/design/composition-layout.md (proposed target-aware layout, with the digest-stability condition that decides whether the move is a relocation or a release).
  • Updated: architecture overview, support matrix, README, category indexes.
  • docs/roadmap/current.md drops the completed P0 and rewrites the vector priority around usd-vector-plugins v0.1.0, which already declares usd-fileformat:geojson and 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 under share/.

Verification

python tools/validate_metadata.py --release v0.1.0 passes all 46 checks and python tests/tooling/test_metadata_tools.py passes 9 of 9. Committed release evidence and the v0.1.0 release record are untouched.

🤖 Generated with Claude Code

snkmcb and others added 2 commits September 4, 2026 22:27
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>
@snkmcb
snkmcb merged commit 6eb9460 into main Sep 5, 2026
1 check passed
@snkmcb
snkmcb deleted the feat/runtime-metadata-baseline branch September 5, 2026 07:28
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.

1 participant