symfonic.memory.backends.postgres_retirement_witness¶
postgres_retirement_witness ¶
Internal signed envelope for a separately verified chat retirement (CORE-428).
Signing is a coordinator operation, never an Agent/runtime API. The envelope
does not itself prove that the chat intent was read from the protected DB;
the issuer must perform that read before calling seal. SQL completion
must verify the MAC with its own NOLOGIN-owned key before any chat DML.
seal ¶
seal(evidence: TerminalRetirementEvidence, chat: ChatRetirementIntent, *, witness_key_id: str, witness_key: bytes, receipt_key: bytes, anchor_key: bytes) -> SignedRetirementWitness
Seal already-verified evidence; do not use from the API/worker process.
Source code in src/symfonic/memory/backends/postgres_retirement_witness.py
verify_envelope ¶
verify_envelope(witness: SignedRetirementWitness, *, witness_key_id: str, witness_key: bytes) -> RetirementClaims
Pure test/reference verifier; the chat DB must repeat this independently.