Conversation
Why: keep the signed Commons receipt verifiable while moving runtime-only trace and actor context out of the canonical payload.
Contract impact: verb responses now return { receipt, runtime_metadata } and /verify accepts either wrapped or bare receipts.
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
runtime-corewhile moving runtime-only context (trace, actor, delegation/orchestration details) out of the canonical payload./verifyaccept either a bare canonical receipt or the new wrapper and by minimizing changes to verification/schema logic.Description
makeReceiptinserver.mjsso it builds and signs a canonical receipt that excludes runtime-only fields liketrace,actor, anddelegation_result, and addwrapReceiptResponseto produce the wrapper{ receipt, runtime_metadata }returned by verb endpoints.server.mjsto return the wrapper viares.json(wrapReceiptResponse(receipt, { trace, actor }))and return wrapper-shaped error receipts on signing errors./verifylogic inserver.mjsto accept either a bare receipt or a wrapped object (viaextractReceiptPayload), to normalize and verify the extracted canonical receipt withruntime-core, and to run schema validation against the extracted canonical receipt only.runtime/tests/runtime-signing.test.mjs,tests/smoke.mjs,scripts/smoke.mjs,tests/fixtures/make-golden.mjs,tests/fixtures/golden.receipt.json, andtests/golden.mjs; also updateREADME.mdexamples and guidance to document the new response shape and verification boundary.Testing
npm run checkand it completed successfully with no syntax errors.npm run test:unitand all tests passed (16/16runtime tests passed).node tests/fixtures/make-golden.mjsandnode tests/golden.mjswhich succeeded.npm test(unit tests + smoke) and it completed successfully; note there is no./e2e.shin this repo so stack e2e was not run.Codex Task