feat(registry): spec 026 contract signing + revoked.json lifecycle marker (#621) - #625
Merged
Merged
Conversation
…rker (#621) Co-Authored-By: Claude Opus 5.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.
Summary
Implements spec
026-model-rights-complianceFR-012 and FR-013 (decision-log entries 127/128).Spec amendment (owner decision, decision-log 128)
Spec 026 v1.0.0 said the contract signature covers the hash of canonical JSON. Published contracts contain 91,239 floats (embedding examples), and Python (
1e-05), JavaScript (0.00001) and Rust (1e-5) serialize those differently, so traverse-runtime could not reproduce the hash reliably. The owner chose to sign the raw committedcontract.jsonbytes instead. Contracts are immutable, and the index already publishes this exact hash ascontract_digest(spec 009), so no canonicalization is needed. Spec 026 moves to 1.1.0 in bothapproved-specs.jsoncopies; no other requirement changed.Contract signing (FR-012)
sign_artifacts.py: every newsignature.jsonaddscontract_sha256(SHA-256 of the committed contract bytes) andcontract_signature_hex(Ed25519, same key, over the 32 digest bytes). Revoked versions are skipped, like deprecated ones.capability_validation.py:signature.contract_digest_mismatch,signature.bad_contract_signature,signature.missing_contract_signaturewhen only one field is present). Verification fails closed whencryptographyis missing (signature.verifier_unavailable).signature.jsonmust carry both fields (check_new_signatures_cover_contract).capability-validationjob now installscryptography(the sign jobs already did).revoked.json(FR-013){reason, evidence_url (https), revoked_at (ISO-8601 UTC)}, which must sit next to acontract.json(revocation.invalid,revocation.orphaned).check_immutability(capabilities.revocation_modified). The contract and artifact are already immutable.deprecated.json.revocationrecord next tostatus: "revoked"(Implement spec 026 model rights: ModelRef schema, CI gates, index, crate types #620 added the status) and fails the build on an unreadablerevoked.json.traverse-registry0.27.0 gainsPublicRevocationandPublicRegistryCapabilityRecord.revocation(serde(default)).Docs
docs/artifact-signing.md: contract-signature section plus a verification snippet.docs/model-rights.md: a "Signing and revocation" section that describes how to revoke.Canonicalization rule for traverse-runtime (cross-repo traverse-framework/traverse#1598): none. Hash the bytes fetched from
contract_urland verifycontract_signature_hexover that digest withpublic_key_hex.Governing Spec
Project Item
Closes #621
Definition of Done
test_changing_any_contract_byte_breaks_itandtest_contract_signature_covers_exact_committed_bytesValidation
test_capability_validation.py: 12 new tests (contract signature and revocation)test_build_index.py: 1 new test plus an extended status testtest_sign_artifacts.py: 2 new testscargo test -p traverse-registry --locked,cargo clippy ... -D warningsbash scripts/ci/pre_pr_check.sh🤖 Generated with Claude Code