Finding
Current main in src/lib/covenant/runtime.ts has an evidence-truth regression after the Phase 2 evidence integration.
Pre-execution failure paths call ManagedIntermediary.processRequest(...) and return res.receipt.receipt_hash.value as the public evidence_hash, while also returning metadata.audit_logged: true. They do not call generateEvidence(), do not insert a record into evidenceLedger / auditLog, and do not invoke forwardToPgl().
Affected paths observed on current main:
- generic Phase 1
reject(...) paths: unknown/suspended/invalid-signature/replay/missing capability - Phase 2 policy denial
- Phase 3 quarantine
- Phase 4 budget denial
- Phase 5 approval-required quarantine
This creates two incompatible meanings for the same response field:
- authorized/execution-error paths:
evidence_hash = Covenant envelope_hash, retrievable from Covenant audit evidence and eligible for PGL forwarding - pre-execution denial/quarantine paths:
evidence_hash = intermediary receipt hash only, while audit_logged still claims true
That violates the source-of-truth boundary and can cause callers to treat an intermediary receipt as Covenant/PGL evidence.
Required correction
Make every terminal decision truthful and unambiguous:
- Seal a Covenant evidence envelope for denied/quarantined/error pre-execution outcomes, linked to the intermediary receipt ID/hash, or explicitly return a separately named receipt field and set Covenant evidence/audit state to
NOT_RECORDED / NOT_VERIFIED until a real evidence record exists. - Do not report
audit_logged: true unless the record is actually present in the canonical Covenant audit store for that response. - Do not overload
evidence_hash with two hash domains. Keep envelope_hash, intermediary receipt_hash, and eventual Gnomledger/PGL hash semantically distinct. - For non-executed decisions, do not label execution status as success. Evidence should distinguish
not_executed, denied, quarantined, and actual execution success|error without inventing an execution result. - Add focused negative-path regressions covering unknown agent, invalid signature, policy denial, safety quarantine, budget denial, and missing approval. Each test must prove the returned hash resolves to exactly the evidence domain it claims and that audit/PGL state is truthful.
- Preserve cAPI as canonical Interlink and Gnomledger as durable external evidence/provenance; local signing must not be presented as durable ledger persistence.
Verification required before merge
- exact-head unit/integration tests for all terminal decision classes
- lint/typecheck/build
- secret scan / dependency review / CodeQL where configured
- no concrete credentials/private Ollama IPs in fixtures
- runtime remains UNVERIFIED until listener
3003, HTTP/protocol identity, container listener, and Traefik routing independently agree
observed_current_responsibilities: cAPI performs Interlink routing/governance and creates local Covenant evidence plus intermediary receipts; Gnomledger forwarding is best-effort external persistence.
target_responsibilities: one truthful response contract with separate cryptographic domains and no unsupported audit/ledger claims.
reported_runtime_state: cAPI 3003.
verified_runtime_state: none from this source audit.
unverified_claims: deployed SHA, listener 3003, HTTP/protocol identity, Traefik routing, Gnomledger registration/persistence, and any denial-path durable evidence.
Finding
Current
maininsrc/lib/covenant/runtime.tshas an evidence-truth regression after the Phase 2 evidence integration.Pre-execution failure paths call
ManagedIntermediary.processRequest(...)and returnres.receipt.receipt_hash.valueas the publicevidence_hash, while also returningmetadata.audit_logged: true. They do not callgenerateEvidence(), do not insert a record intoevidenceLedger/auditLog, and do not invokeforwardToPgl().Affected paths observed on current
main:reject(...)paths: unknown/suspended/invalid-signature/replay/missing capabilityThis creates two incompatible meanings for the same response field:
evidence_hash= Covenantenvelope_hash, retrievable from Covenant audit evidence and eligible for PGL forwardingevidence_hash= intermediary receipt hash only, whileaudit_loggedstill claims trueThat violates the source-of-truth boundary and can cause callers to treat an intermediary receipt as Covenant/PGL evidence.
Required correction
Make every terminal decision truthful and unambiguous:
NOT_RECORDED/NOT_VERIFIEDuntil a real evidence record exists.audit_logged: trueunless the record is actually present in the canonical Covenant audit store for that response.evidence_hashwith two hash domains. Keepenvelope_hash, intermediaryreceipt_hash, and eventual Gnomledger/PGL hash semantically distinct.not_executed,denied,quarantined, and actual executionsuccess|errorwithout inventing an execution result.Verification required before merge
3003, HTTP/protocol identity, container listener, and Traefik routing independently agreeobserved_current_responsibilities: cAPI performs Interlink routing/governance and creates local Covenant evidence plus intermediary receipts; Gnomledger forwarding is best-effort external persistence.target_responsibilities: one truthful response contract with separate cryptographic domains and no unsupported audit/ledger claims.reported_runtime_state: cAPI3003.verified_runtime_state: none from this source audit.unverified_claims: deployed SHA, listener3003, HTTP/protocol identity, Traefik routing, Gnomledger registration/persistence, and any denial-path durable evidence.