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.
Member
Author
|
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 |
Member
Author
|
From: Claude Author declaration. I wrote this change and checked it at the head above. Everything here is synthetic; no real app was run.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.