Repository navigation
Receipts: public card, transaction lines, Rekor anchors and a receipt-first viewer - #2426
Conversation
…or anchors for receipts, and a viewer that checks receipt.json first
…into feat/receipt-surfaces
…into feat/receipt-surfaces
Independent adversarial review: REQUEST CHANGESFrom: Codex The signed receipt, public card and offline viewer need to agree on what the signer actually verified.
Generality and evidence. The affected paths contain no app-specific engine behavior. These are shared signing, disclosure and verification defects across transaction and write receipts and across CLI and browser consumers. I reviewed the source and committed tests against stack base The protected check reports that this draft targets a non-main branch. Carry the upstream approval-history correction when updating the stack, then retarget after the prerequisite lands. Protected check · Upstream review |
Evidence lines join the write lines before the line limit, so every one of them decides the outcome; the pre-seal disclosure and the report-required check keep the public-log anchor line. Viewer rebuilt from the merged source.
Independent adversarial review: REQUEST CHANGESFrom: Codex I checked the changes specific to #2426 against
These findings concern shared receipt behavior across two evidence formats and the CLI and browser readers. This was a source and test review. I ran no new tests and submitted nothing to a public log. The current fixtures leave the 65-receipt boundary, mismatched recovery sidecars and mixed-validity viewer inputs unqualified. |
…viewer and anchoring Instance fixes, named by class until the shared fail-open harness lands: - truncation: every evidence receipt in the run counts; no cut at 64. - unverified evidence: a tx or write receipt's verdict is promoted only when its signature verifies (the run's tx workdir key, this computer's key); a receipt is anchored only after its DSSE signature verifies. - unverified reuse: an existing receipt is kept only if it verifies with its sidecar; a card opens only committed values; the tutorial name opens only when the signed report carries the tutorial approval source. - dropped requirement: the viewer never lets a receipt override a failed required authorization or anchor, or stand in for one. - trust label: a supplied older Seal registry never vouches for a receipt as this computer's; a receipt with no role registry fails closed.
|
How each item in Codex's review at
Tests: test_receipt_verify.py 43, test_seal_view.py 30, test_seal_anchor.py 49, vitest 54, all passed; mypy clean on the touched modules. |
Independent adversarial review: REQUEST CHANGESFrom: Codex I checked the single commit since the previous review. It removes the 64-file cut, verifies evidence signatures, preserves required authorization and anchor failures, and stops assigning a local signer role to supplied legacy keys. Item 4 is fixed: the public-log submitter is reached only after the selected key verifies the receipt’s DSSE signature over its payload. Three correctness gaps remain in the scoped changes.
This review used immutable source and the committed assertions. I ran no new tests. The new tests cover a copied transaction with no local key, a mismatched opening and an invalid anchor signature. The same-key cross-run case and the two snapshot changes above remain uncovered. The display work remains in #2479. |
Independent adversarial review: REQUEST CHANGESFrom: Codex The three findings at The owner still needs to bind write evidence and its digest to the current run and verified bytes, use the bound report snapshot to authorize card disclosures, and refuse a present, unrecognized receipt before falling back to a legacy seal. The earlier public-anchor signature fix is intact. This was a merge-delta review. I ran no tests. |
Independent adversarial review: APPROVEFrom: Gemini Gemini run on e457571 ( |
|
From: Claude |
Ports this branch's receipt surfaces onto main's settled-run writer (#2412): verified evidence-receipt lines join the write lines under the limit, the public card is written (and rewritten on verified reuse), the public-log anchor line is checked in verify_run_receipt, and the Flow version is committed by default again. Anchor test fixtures gain ordered results.
|
From: Claude |
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 85e7bff ( |
…writer The seal-view CI job runs against the released openadapt-flow, which has no openadapt_flow.receipt_record yet; the receipt-first tests now skip there, as tests/test_receipt_verify.py does.
|
From: Claude |
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 725e036 ( The provided delta introduces a single line to This change is safe and does not introduce a fail-open vulnerability in the shipped code for the following reasons:
The merge delta simply brings in upstream changes and does not interact maliciously with this test fix. |
Main now carries #2426's receipt surfaces; the handoff confirmation lines and the guarded awaiting-counterparty receipt attach after build_statement with evidence lines, the card is written, then the handoff sidecar is recorded. Viewer rebuilt.
This PR closes the coordinator's pre-release gaps for receipts. It is stacked on #2410, which is stacked on #2394, so retarget it to
mainafter those two merge.Draft, not for merge. Nothing in it releases until #2394, #2410 and this PR are on main. The release order is privacy 1.1.4, Flow 3.4.0, types 0.25, Flow 3.5 with the pin raised to
>=0.25, then launcher 1.25.What it adds
receipt.card.json: the same signed envelope with only allow-listed values opened. It always opens the Flow version, and opens the program name only for the synthetic tutorial. It is never re-signed, andopenadapt verifychecks it.tx-receipt.coseand*.receipt.cborin a run folder becomes one line of the run's receipt, withevidence: {kind, sha256}.CONFIRMEDandREFUTEDmap to themselves, and anything else isnot_checked/uncertain.evidenceis optional and left out when absent, so the existing vectors are byte-identical.local-seal anchor RUN_DIRalso anchorsreceipt.jsonand writesreceipt.anchor.json. It reuses the Seal anchor's record path and logs the payload's SHA-256, so a later countersignature doesn't change what was logged.openadapt verifyadds "Logged publicly at ".receipt.jsonfirst.receipt.jsonand a role registry, and verifies the receipt in the browser. The receipt must name the exact report bytes.seal.jsonis used, labelled "older format", only when the run has no receipt.src/lib/receiptRecord.mjs) is openadapt-web's, extended to the full schema. It passes all shared vectors.Not in this PR
receipt publishstill uploads the olderpublic-seal/v1card. It will upload receipt cards once cloud#532 accepts them, and that change will land together with Cloud's; coordination is in openadapt-internal#211.Tests
test_write_receipt.pydidn't run locally becausecwtisn't installed here.