3/10 (high risk misalignment).
VerifyAgent is still centered on legacy proof fields and local crypto verification paths, not the canonical runtime receipt envelope and runtime-core verifier contract.
9/10 (release-ready alignment).
Target means VerifyAgent delegates canonical proof verification to verifyCommandLayerReceipt() from commandlayer/runtime-core, accepts the new proof envelope natively, and treats legacy support as explicit compatibility mode (or removed by policy).
Not reliably for canonical runtime receipts as defined in this audit prompt.
Current verifier expects legacy-style values such as:
metadata.proof.canonicalizationmetadata.proof.hash_sha256- receipt-level
signature.alg/kid/sig
It does not require/consume the canonical nested shape:
metadata.proof.hash.alg/valuemetadata.proof.signature.alg/value/kid
Therefore canonical runtime receipts can fail or be partially misinterpreted unless they also carry backward-compatible legacy fields.
metadata.proof.canonicalizationmetadata.proof.hash.alg = "SHA-256"metadata.proof.hash.valuemetadata.proof.signature.alg = "Ed25519"metadata.proof.signature.valuemetadata.proof.signature.kid
- Hash read from
metadata.proof.hash_sha256only. - Signature read from
metadata.proof.signatureormetadata.proof.signature_b64or top-levelsignature.sig. - KID read from
metadata.proof.kidor top-levelsignature.kid. - Canonical ID aliases include
metadata.proof.canonicalandmetadata.proof.canonicalization.
Result: parser/validator is tuned for old/bridge fields and does not model the canonical nested hash/signature objects.
Current result contract exposes booleans/debug fields tied to local logic:
checks.hash_matchedchecks.signature_validdebug.recomputed_hash_sha256debug.expected_hash_sha256
No explicit pass-through/normalization of runtime-core canonical verifier output contract is present (e.g., no imported verifyCommandLayerReceipt() result mapping).
VerifyAgent currently contains local cryptographic authority logic that should be runtime-core-owned:
- Local canonical payload derivation (
canonicalReceiptPayload). - Local canonicalization and SHA-256 recomputation.
- Local Ed25519 public key import and signature verification.
- Local proof extraction with multi-format fallbacks.
- Local mode detection gating cryptographic behavior (
isV110branch).
This creates drift risk against runtime/runtime-core canonical semantics.
Existing tests heavily cover legacy/hash_sha256 and local verifier behavior, but gaps remain:
- No tests pinned to canonical nested
metadata.proof.hash.*+metadata.proof.signature.*envelope. - No tests asserting integration with
verifyCommandLayerReceipt(). - No tests for algorithm casing strictness (
Ed25519vsed25519,SHA-256vssha256). - No explicit negative tests for missing canonical hash/signature subfields in the new shape.
- Tamper tests are legacy-oriented and do not validate runtime-core error/result semantics.
Also, the current test run fails before coverage executes due to duplicate AJV schema registration.
src/verify.js(core orchestration and proof extraction)src/schema.js(shape validation assumptions)src/crypto.js(local crypto authority to de-scope)schemas/clas/trust-verification/_shared/proof.schema.json(proof contract)src/generated/clas-schema-map.js(regenerated artifacts)test/verify.test.js(test contract + fixtures)test/fixtures/*.jsonandexamples/*.json(legacy shape fixtures)README.md,docs/architecture.md,docs/wrap-your-agent.md(claims and examples)
- Adopt runtime-core as cryptographic authority
- Import/use
verifyCommandLayerReceipt()in verification pipeline.
- Import/use
- Define canonical proof schema first
- Add strict schema for nested
hashandsignatureobjects with required alg/value/kid.
- Add strict schema for nested
- Map verifier result contract
- Normalize runtime-core output into VerifyAgent API/UI response (or expose directly).
- Retire duplicate local crypto path
- Remove/disable local hash/signature verification for canonical mode.
- Legacy compatibility policy decision
- Explicitly gate legacy receipt support behind compatibility path/flag.
- Fixture + test migration
- Add canonical fixtures and tampered variants based on new envelope.
- Docs/UI/API alignment
- Update claims, field names, and verified-state criteria.
- No
verifyCommandLayerReceipt()integration. - Canonical proof envelope unsupported as first-class schema.
- Legacy fields treated as primary inputs (
hash_sha256, top-level signature fields). - Crypto verification duplicated locally (drift risk).
- Docs currently claim reference-verifier authority using local logic.
- Test suite currently failing (AJV duplicate schema id), reducing confidence.
No. Not yet safe to treat as a public trust surface for current runtime canonical receipts.
Reason: verifier and schema contracts are not aligned to runtime-core canonical proof authority, and local crypto/proof logic can diverge from runtime/runtime-core semantics.
- No import of
verifyCommandLayerReceipt(). - Verifier imports local crypto helpers (
sha256Hex,verifyHashHexSignature,verifyCanonicalSignature).
- Hash is recomputed locally from canonicalized payload and compared to
metadata.proof.hash_sha256.
- Public key is imported and signature checked locally via WebCrypto Ed25519.
- Proof extraction supports mixed legacy fields, not canonical nested objects.
- Legacy/bridge fields present in parsing and docs/tests:
proof.canonical(alias use)proof.hash_sha256(primary)proof.signature_b64(fallback)- plus top-level signature fallback.
- Requested fields
proof.algandproof.canonical_idare not prominent, but the system still depends on legacy-era equivalents.
- Runtime target expects
Ed25519; fixtures/docs commonly show lowercaseed25519. - No strict canonical algorithm casing guard for nested canonical envelope because nested envelope is not implemented.
- Fixtures include
canonicalization+hash_sha256and top-level signature block.
- Not fully audited in UI rendering code in this pass, but verifier returns
VERIFIEDfrom local checks without runtime-core authority.
- Response shape reflects local check/debug booleans rather than runtime-core canonical verifier contract.
- Legacy tamper behavior exists and generally returns
INVALID, but it validates local pipeline semantics, not runtime-core canonical semantics.
- ENS resolution is mandatory and short-circuits to
INVALIDon failure. - Still paired with local cryptographic verification path.
- README and architecture docs describe local canonicalize/hash/signature pipeline as reference behavior, which is no longer the correct authority model if runtime-core is canonical.