Repository navigation
Conversation
…ation Before submit, form_tx reads the review screen and stops when a value differs from the intake. For a value shown as page text under the whitespace_collapse or casefold codec, that comparison is now an openadapt.effect-location/v1 record (start same_screen) judged by the shared evaluator. Every other codec, checkbox and radio bindings (which fall back to yes or no), and values held in form controls keep form_tx's own comparison. No decision changes: a differential test runs the old comparison (vendored from 1ddd697) and the port over a corpus of intake values and shown texts for every ported binding. A value found but not held still stops the run; only "not shown" and "shown more than once" are skips, as before.
|
From: Gemini (gemini-3.1-pro-preview), round 1 Sent the full diff of this PR's own files, those files in full, and any earlier findings. The PR successfully ports the review-page text comparison for NIT
APPROVE WITH NITS |
|
From: Claude Author declaration. I wrote this change and checked it at the head above. Everything here is synthetic; no real app was run.
|
|
Architectural pivot (founder Option 1, 2026-11-23): freezing the hand-written form-tx DOM heuristic and word-list stack to focus on openadapt wrap + demonstration-derived CheckpointSpec + Cross-Tab Entity Ledger + GUI-to-API/MCP promotion. Branch preserved for reference. |
What this does
This is step 2a: it moves form_tx's review-page check onto the effect-location record (#2500). It is based on #2461.
Before submit, form_tx reads the review screen and stops when a value there differs from the intake (
_review_mismatch_halt). One case of that comparison now goes through anopenadapt.effect-location/v1record (startsame_screen), judged by the shared evaluator: a value the review page shows as page text, under thewhitespace_collapseorcasefoldcodec. The new adapter isform_tx/review_location.py;reconciler.pychanges by 15 lines.These cases keep form_tx's own comparison, because the record can't yet express their rules:
exact,iso_date,currency_cents,integer,phone_digits,title_case,upper,boolean_yes_noandenum_map;Includes a carried commit. The first commit carries the
effect_locationpackage unchanged from #2500. Review only the second commit.No behaviour change
tests/test_form_tx_review_location.pyvendors the pre-port_text_pair_matchesand_is_placeholder_or_emptyfrom1ddd69712(judge.py, lines 129 to 184). It compares them with the port over a grid:5,True,None,1.5);Every decision matches. An intake value the codec can't read isn't ported; the old comparison runs for it, and the test checks that the old comparison doesn't match it either.
Which way the gate fails. A value that is found but doesn't hold, refuted or unreadable, still stops the run. Only "not shown" and "shown more than once" are skips, and the old code still decides those before the adapter is called. A placeholder is never the value, even when the intake reads the same.
This port found no fail-open to fix. For these two codecs the old and new comparisons agree.
Tests
All synthetic.
tests/test_form_tx_review_location.py: 20 passed.tests/test_effect_location.py: 48 passed, 8 skipped.tests/test_form_tx*.py, headless) on this branch: see the comment below.ruff checkis clean.Next
not_checked(set4v2, larkspan). Atemplatelocation would give name and date of birth their own verdicts. That is a stated behaviour change, not a fail-open fix, so it gets its own PR.