Repository navigation
Conversation
# Conflicts: # CAPABILITIES.md # llms-full.txt # packages/flow/CHANGELOG.md
…adder Run receipts (record/run/v1) carry the optional evidence_scope block; a receipt without it keeps its canonical bytes and still verifies. A run receipt never says VERIFIED below check level 3. Fake-verifier verify-run tests now take a baseline so the frame is judged. tx tests that expected UNCERTAIN for a cache-bypassed, version-checked API read now expect CONFIRMED with basis system_api; undo still needs the row authority.
# Conflicts: # packages/flow/openadapt_flow/receipt_record.py # packages/types/openadapt_types/receipt.py
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 6140966 (gemini-3.1-pro-preview). Header corrected: this review was produced by Gemini, not Codex. Note: the Codex CLI stopped before reviewing because its account hit a usage limit (retry possible from Nov 27). As the review procedure allows, the review was run on Gemini ( Summary of the review Gemini found no blockers:
The review was short and gave no file-level findings. VERDICT: APPROVE |
What this does
Makes
openadapt_types/check_level.pythe only source of check levels and gives every receipt one word for its evidence.One ladder.
verify-run, the runtime report, thetxengine and Execute v1 build their tier and strength tables fromcheck_level. A separate-session read is level 3 on every path. It counts asVERIFIEDwith basisseparate_sessionwhen the contract's minimum isindependent_session. Before this change,verification.pyandverify_run.pydisagreed about it. The default minimum (independent_system_of_record) is unchanged.Receipt words.
outcome_word(level, basis)returnsVERIFIEDonly for levels 3 and 4, and only with a basis (separate_session,system_api,activity_log,db_frame,owned_connection). A same-screen or reopened check isSHOWN, a counterparty check isCONFIRMED, an operator's confirmation isATTESTED, and anything else isRECORDED.VERIFIEDmeans "as of the read-back time, the read-back showed X", not "persisted".Evidence scope.
openadapt_types/evidence_scope.pyaddsopenadapt.evidence-scope/v1. It records the check level, the word, the basis, the wire scope (the channel watched and the protocols parsed), the read-back time, the recheck window andnot_covered.not_coveredalways listsserver_side_async_effectsandoutbound_effects.verify-runreceipts carry the block, and so dotxreceipts and their results.record/run/v1). There it is an additive, optional predicate field. When the field is absent,wire()leaves it out, so older receipts keep their canonical bytes and still verify. All existing shared vectors are byte-identical after regeneration. Two new vectors were added:valid-evidence-scopeandevidence-scope-disagrees.read_back_timeinnot_coveredinstead of guessing one.UNKNOWNwith reasonbelow_verified_level. It is neverVERIFIED, and no built-in profile produces such a run.tx without SQLite authority.
tx/lens.pyno longer caps every verdict atUNCERTAIN. A post-commit update read isCONFIRMEDwith basissystem_api(tx/api_readback.py) when all of these hold:Age, cache-status orWarning 11xheaders, and the status is not 304);Anything else is still
UNCERTAIN. Undo still requires the row authority.The new code is in new modules:
evidence_scope.py,evidence_basis.pyandtx/api_readback.py. No size or import budget was raised.Compatibility with #2476 (verdict kernel)
git merge-treeagainstclaude/fail-open-generalconflicts only inpackages/flow/CHANGELOG.md, and theverify_run.pyhunks are disjoint. I ran #2476'scheck_verdict_folds.pyon the merged tree, and this branch adds no folds. The only increase issays_successinhooks/cli.pyandhooks/engine.py. That code is already on main, so #2476 needs to refresh its baseline either way.Tests
Run with the CPU slot runner:
packages/types/tests: 845 passed.packages/flow/tests, the tx, hooks, execute, receipt, seal, countersign, verify-run, one-ladder, readback and check-level files: 1166 passed, 8 skipped, 3 failed.test_hooks_e2e.py(invalid_write_evidencefromreceipt_record._write_lines). They fail the same way on a cleanorigin/main(e754d56).test_tx_atomic_authority.py::test_http_redirects_cannot_change_endpoint_method_or_forward_credentials, was a connection reset under load. It passed 3 of 3 times when rerun.tests/test_cli_seal.py,test_quickstart.py,test_quickstart_lifecycle.pyandtest_quickstart_command.py: 117 passed, 2 skipped.ruff checkpassed andruff format --checkwas clean.tests/test_one_ladder.pychecks that the same evidence gets the same level, word and basis on every path: the runtime report,verify-run,tx, Execute v1 and the run receipt. Tests that expectedUNCERTAINfor a version-checked API read now expectCONFIRMEDwith basissystem_api.test_oracle.pynow expects an Execute receipt that opted in toindependent_sessionto validate as verified at tier 1. It still can't mint a production Seal.Not in this PR
THREAT_MODEL.md.The Cloud and website TypeScript receipt verifiers must accept the optional
predicate.evidence_scope(shared vectors) before a release ships receipts that carry it.