Add execution receipt proof scopes#38
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2af1cd8bb9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "executionProof": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["type", "covers", "signer", "canonicalization", "signature"], |
There was a problem hiding this comment.
Require proof hashes on execution proofs
When a clas.execution.receipt.v1 receipt is accepted by this schema, the execution proof is only required to carry scope, canonicalization, and signature metadata, but no payload hash. That conflicts with the repository rule in docs/schema-rules.md that every CLAS receipt proof includes a proof.hash SHA-256 digest, so schema-valid execution receipts will not expose the canonical payload hash that existing verification flows expect before signature verification.
Useful? React with 👍 / 👎.
| "$defs": { | ||
| "sha256Uri": { | ||
| "type": "string", | ||
| "pattern": "^sha256:.+" |
There was a problem hiding this comment.
Enforce SHA-256 digest syntax for receipt hashes
The shared sha256Uri accepts any non-empty suffix, so receipts with values like sha256:not-a-digest pass for action.input_hash, action.output_hash, and settlement.payee_commitment. In any flow that treats schema validation as the shape check before canonicalization or selective disclosure, these malformed commitments cannot be used as SHA-256 digests; existing CLAS schemas use ^sha256:[a-fA-F0-9]{64}$ for this reason.
Useful? React with 👍 / 👎.
| "type": "string", | ||
| "minLength": 1, | ||
| "not": { | ||
| "pattern": "^0x[a-fA-F0-9]{64}$" |
There was a problem hiding this comment.
Reject all raw transaction-hash forms
This only rejects the exact lowercase 0x spelling, so a public settlement receipt can still pass schema validation with a bare 64-character hex transaction hash, or the same hash written with 0X, in payment_ref. In contexts where this schema is the privacy gate before publishing receipts, those values still expose the raw public transaction hash that the field description says must not be allowed.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,272 @@ | |||
| { | |||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |||
| "$id": "https://schemas.commandlayer.org/schemas/v1.0.0/execution/execution.receipt.schema.json", | |||
There was a problem hiding this comment.
Add the versioned execution schema target
This schema advertises a versioned $id, but the commit only adds it under schemas/execution; I checked the versioned tree and there is no schemas/v1.0.0/execution/execution.receipt.schema.json target for this URL. In environments that resolve schema IDs through the published /schemas/v1.0.0/... path, receipts using clas.execution.receipt.v1 cannot fetch the schema even though the root manifest now lists the family.
Useful? React with 👍 / 👎.
Motivation
Description
clas.execution.receipt.v1atschemas/execution/execution.receipt.schema.jsonwhich requiresproofs[]and enforces scoped proof shapes.executionproofs to exactly `[Codex Task