Repository navigation
flow: an unknown versions target_surface is not_checked; QUESTIONS.md shows a missing version check - #1838
Conversation
… shows an update with no version check
Independent adversarial review: APPROVEFrom: Codex. Reviewed actual head The previous guard-only blocker is fixed. The original seven independent SQLite probes are unchanged and all pass, including the formerly failing correct/lost-update guard-only cases. Two additional controls confirm that a real write target beside a guard still produces a VERIFIED receipt for a correct write and refuses a real lost update. Validation: all 151 author-suite tests pass, including live PostgreSQL 16 generator cases; full Flow Ruff/format and mypy pass (591 sources). Synthetic data, headless resource gate and isolated probe state. No reviewed source edits or pushes. No new blocking finding in this PR's surface-validation and question-notice changes. The other #1675 items listed in the PR remain outside this approval. |
A record_written guard with expected_count 0 never yields a target, so a target_surface naming only its surface left zero targets, which held, and a lost update was VERIFIED. The surface check now uses the same writes_a_target() as target collection.
|
Fix for the BLOCK in #1838 (comment), at 40bc926. A Tests (test_frame_versions.py, real SQLite):
Run: test_frame_versions.py, 27 passed. Frame, verify_run, guarded-save, effect-sql and deferred-report suites with -n 4: 351 passed. ruff check, ruff format and mypy on verify_run.py are clean. |
Part of #1675
Two of the round 3 items from #1675. The others are not in this PR (listed below).
What changed
frame.versions.target_surfaceis now checked against the effects (packages/flow/openadapt_flow/verify_run.py,_judge_versions). Before, a hand-written surface that norecord_writtenorfield_equalseffect reads (a typo) left zero targets, and zero targets came outheld, so a lost update was verified. Now the versions check isnot_checkedwith the new problem codeunknown_surface(added toPROBLEMSinruntime/effects/versions.py), and the frame isnot_checked. Fail closed.versions: nullinreport.json),QUESTIONS.mdnow says so under that kind. Before, onlyreport.jsonshowed it (generate/verify_contract.py,_questions_md). Refused kinds and creates get no such line.docs/VERIFY_RUN.mdlistsunknown_surface, anddocs/GENERATE_CONTRACTS.mdsays whereversions: nullshows.How it was tested
test_a_target_surface_no_effect_reads_is_not_checkedintests/test_frame_versions.py, for a correct update and a lost update. On the base commit both fail: the status isheld.test_an_update_with_no_version_check_says_so_in_questionsintests/test_generate_verify_contract_attacks_r3.py. It fails on the base commit.tests/test_frame_versions.py,test_verify_run.py, the fourtest_generate_verify_contract*.pyfiles and the twotest_generate_coincidences*.pyfiles against a local PostgreSQL 17: 148 passed.Not done here (still open on #1675)
mode: skiptables.What couldn't be tested
target_surface. The tests use a SQLite fixture.