Skip to content

align runtime to canonical CLAS receipt emitter#66

Merged
GsCommand merged 1 commit into
mainfrom
codex/align-runtime-with-canonical-clas-apis
May 17, 2026
Merged

align runtime to canonical CLAS receipt emitter#66
GsCommand merged 1 commit into
mainfrom
codex/align-runtime-with-canonical-clas-apis

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Migrate runtime signing/verification from legacy runtime-core helpers to the canonical CLAS runtime-core API surfaces to ensure a single canonical receipt envelope and remove legacy proof fields.
  • Emit and verify a predictable canonical proof envelope under receipt.metadata.proof so downstream consumers use a stable shape (canonicalization, nested hash, nested signature).

Description

  • Replaced legacy imports in server.mjs (CANONICAL_ID_SORTED_KEYS_V1, signReceiptEd25519Sha256, verifyReceiptEd25519Sha256) with canonical APIs (CANONICAL_METHOD, signCommandLayerReceipt, verifyCommandLayerReceipt).
  • Switched config from canonicalId to canonicalMethod (runtimeConfig.canonicalMethod = CANONICAL_METHOD) and updated all callers/diagnostics to use the new name.
  • Reworked makeReceipt to populate metadata.proof as a canonical envelope (canonicalization, hash: { alg: "SHA-256", value }, signature: { alg: "Ed25519", value, kid }, signer_id, plus trace/receipt ids) and call signCommandLayerReceipt(receipt, { privateKeyPem, kid }).
  • Replaced verification flow to consume the canonical shape and call verifyCommandLayerReceipt(runtimeCoreReceipt, { publicKeyPemOrDer }), preserved the ok/checks/errors structure, and added an explicit status field propagating `

Codex Task

Why: migrate runtime to canonical CLAS runtime-core signing and verification surfaces while removing legacy proof output fields.
Contract impact: updates emitted/verified proof envelope to metadata.proof.{canonicalization,hash,signature} while preserving verifier status/checks/errors semantics.
@GsCommand GsCommand merged commit 9a1f671 into main May 17, 2026
1 check failed
@GsCommand GsCommand deleted the codex/align-runtime-with-canonical-clas-apis branch May 18, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant