Add optional metadata.trace to receipts and extend shared proof schema#36
Merged
Merged
Conversation
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.
Motivation
metadata.traceto trust receipts to support distributed trace correlation without breaking existing receipts.json.sorted_keys.v1anderc8211.merkle.v1canonicalizations and to support solver-style multi-signature proofs while remaining backward compatible with single-signature proofs.Description
schemas/trust-verification/*/*.receipt.schema.jsonto include an optionalmetadata.properties.tracewith"$ref": "../_shared/trace.schema.json"while keepingmetadata.requiredas["proof"]andmetadata.additionalProperties: false.schemas/trust-verification/_shared/proof.schema.jsonto changecanonicalizationfrom aconstto anenumallowingjson.sorted_keys.v1anderc8211.merkle.v1, and changedsignatureto aoneOfthat accepts the existing single-signature object or a multi-signature array where each entry requires arolefrom the allowed set.schemas/trust-verification/_shared/trace.schema.json(a local copy/reference) to ensure receipt-local../_shared/trace.schema.jsonreferences resolve during validation without altering the originalschemas/trust/_shared/trace.schema.json.scripts/validate-trust-verification-examples.mjsto load the trace schema and to run explicit schema checks for single-signature +json.sorted_keys.v1,erc8211.merkle.v1+ signature array withrole,metadatawithproofonly,metadatawithproof+trace, and rejection of unknown extra metadata fields.Testing
jqparsing check over all modified JSON files succeeded (no JSON syntax errors).npm test(runsnode scripts/validate-trust-verification-examples.mjs) passed and reported all trust-verification example validations and the new schema checks asPASS.npm run buildandnpm run typecheckare not available in this repository (missing scripts) and were therefore not executed.Files changed: 13 (including
schemas/trust-verification/_shared/proof.schema.json,schemas/trust-verification/_shared/trace.schema.json, 10 receipt schemas underschemas/trust-verification/*/*.receipt.schema.json, andscripts/validate-trust-verification-examples.mjs).Receipt schemas updated: 10.
Request schemas, OpenAPI files, and MCP tool files were not modified.
Codex Task