Skip to content

bench(form-tx): measure the gap fixes on four new held-out quote portals (verdict: rework) - #2453

Open
abrichr wants to merge 116 commits into
claude/form-tx-weekendfrom
claude/form-tx-heldout2-run
Open

abrichr wants to merge 116 commits into
claude/form-tx-weekendfrom
claude/form-tx-heldout2-run

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member

Measures the form layer, with the five gap fixes, on four new held-out synthetic quote portals. Verdict: rework.

Stacked on #2429. It merges the five fix PRs (#2449, #2448, #2440, #2441, #2447) plus a little integration glue, so merge it after them.

Results

New portals, held out, arm B, 33 cases:

Criterion Bar Result
Trap cases stopped before submit ≥ 75% 15 of 18 (83%), met. None of those 15 then ended correct.
Clean cases with a false stop ≤ 10% 10 of 15 (67%), not met
Submitted quotes verified with a receipt ≥ 50% 1 of 11 (9%), not met
Wrong values submitted 0 5, not met. All 5 were flagged after submit and none got a receipt.

The unguarded filler got 21 of 33 wrong, with no flag.

Old four portals, now a dev set, same engine: 20 of 32 correct (the first run got 6), 10 verified (the first run got 0), and no crashes (the first run had 8). It also issued 2 receipts for wrong quotes: the wrong field was a driver list that the pack never bound.

Main causes, in RESULTS.md:

  • A sign-in partway through a quote resets fields that the layer does not re-check. Read-back caught every case.
  • Controls the pack does not bind are not checked.
  • Some stops have no field label, or show the radio option instead of the group name, so the operator can't act on them.
  • Read-back of split dates and of unlabelled results is not supported.

What's here

  • packages/flow/benchmark/form_tx_heldout2/: the new portals and answer key. A separate agent built them without reading the form layer.
  • packages/flow/benchmark/form_tx_heldout2_run/:
    • the pre-registration, pushed before any run, with deviation D1, which re-pins the engine before the first scored case;
    • ENGINE_SHA;
    • the dev-case demonstrations;
    • the raw rows and the results.
  • Runner changes: --suite, operator sign-in, and the by-hand estimator now off by default.
  • Packs for both sets.
  • Cross-feature tests, and the integration-only fixes that need more than one of the PRs.
  • The CAPABILITIES row and a refreshed llms-full.txt.

Everything is synthetic.

Frame routing (Codex's codex/frame-form-surface commits, cherry-picked
above) becomes pack data: UIProfileSpec.frame_path_patterns, used when the
surface gets no explicit patterns.

Every in-page script now walks open shadow roots: controls, labels,
sections, banners, sign-in walls, modals, busy markers and listboxes.
A control inside a shadow root gets the selector
'<host selector> >> <selector inside the root>', which Playwright
locators accept. Closed shadow roots stay invisible.

A child popup that closes itself after its apply button ends its settle
wait instead of raising, as before the frame commits.
A popup routine can now list compute_anchors, buttons clicked in order
before its apply button (Calculate, then Use This Value), and can run as a
dialog in the same page (popup_mode: in_page). Popup inputs are re-read
before the first step and again before apply, and still stay not_checked
unless the stored record shows them.

An estimator result that differs from a value the intake already gives now
stops before submit instead of being kept. A popup that will not open, a
missing or ambiguous button, or a popup that never settles becomes a
POPUP_CONTRACT_FAILED stop instead of an exception out of the run.
A portal combobox that is a text input is now filled by typing, so
suggestions that load only after typed text appear. A suggestion is chosen
only when exactly one matches under the codec, and the choice is checked
afterwards. A control the surface cannot act on stops for an operator
instead of raising out of the run; after the submit click it ends
delivery_uncertain.
…dios as empty

An error banner or dialog whose text says the session ended is now a sign-in
wall (auth_required), checked before any error is read as a validation
failure, on every post-action path. After a submit request went out it is
delivery_uncertain and cannot resume. Patterns are UI-profile data
(session_expired_text_patterns) with generic English defaults.

Native radios sharing a name are one field: an unchecked radio reads as
empty, keeps its own value in radio_value and lists its group in options; an
anchor matching a group resolves to the checked radio; a required group with
no intake value stops once.
A confirmation page that shows the stored quote as text, not in form
controls, left every field not_checked. The snapshot now also collects label
and value pairs from definition lists, two-cell table rows, one-row header
tables and "Label: value" text, including inside open shadow roots. They are
kept out of the controls, so nothing fills or halts on them.

When a read-back anchor finds no control, the judge falls back to these
pairs by label: a label shown twice is not_checked, an empty or different
value is failed, the same value is passed. Outputs such as a quote number
are read the same way. Popup inputs re-read before apply stay not_checked.
…o claude/form-gaps-integration

# Conflicts:
#	CAPABILITIES.md
… into claude/form-gaps-integration

# Conflicts:
#	CAPABILITIES.md
#	packages/flow/openadapt_flow/form_tx/playwright_surface.py
…nto claude/form-gaps-integration

# Conflicts:
#	CAPABILITIES.md
#	packages/flow/docs/FORM_TX.md
… into claude/form-gaps-integration

# Conflicts:
#	CAPABILITIES.md
#	packages/flow/openadapt_flow/form_tx/reconciler.py
#	packages/flow/openadapt_flow/form_tx/surface.py
… bare-text radio labels, and common select placeholders
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: f3fdcc2

This is a first review of the second held-out results PR (verdict: rework). The raw numbers, order of record, and integration glue check out. The public CAPABILITIES row does not state all three required caveats plainly.

summarize.py --suite=heldout2 on results/arm_B.jsonl matches the new-portal table: 33 cases (18 trap / 15 clean), 6 correct, 11 submitted, 5 wrong (all flagged, none with a receipt), 1 verified with a receipt, 15 of 18 trap cases stopped before submit and 0 of those then correct, 10 of 15 clean false stops, 22 unsubmitted, 35 not_checked, 6 readback_incomplete, 27 / 10 operator hand-backs, 0 harness errors, and the four per-portal rows. The dev-set file has to be scored with --suite=heldout (heldout2 has no hl-s01 keys); those pooled counts also match RESULTS (32 cases, 20 correct, 10 verified, 25 submitted, 5 wrong including 2 verified receipts, 16 of 18 traps stopped with 9 then correct, 2 of 14 clean false stops). Arm A is 12 correct, 21 silent wrong, 0 unsubmitted, and 3 right / 5 or 6 wrong on every portal. The two false receipts are cobalt cr-s02 and cr-s07 (additional_drivers, not bound, read-back all passed). Of the five new-portal wrong quotes, fc-s02 (client_no) and gw-s04 (roommate) are readback_incomplete on other fields, not the wrong one. Of the 15 stopped traps, 12 escalated and 3 were submitted wrong after a mid-quote sign-in (fc-s04, ok-s03, vw-s06).

Order of record holds: 46b8a4aef (05:28:55 America/Toronto (EST)) is an ancestor of the portals merge 892957823 (05:29:11). git diff 72a6ad428 7a2abea0c -- packages/flow/openadapt_flow is empty.

The integration glue outside the five fix PRs is sound and fail-closed: _read_popup_result falls back to match_text_pair_in_snapshot only when no control matches, and ambiguous or empty text still stops; SurfaceStateError is in the general surface-action error list, so a control that did not take its state becomes a person stop.

RESULTS.md already states all three caveats: K1 is met only through escalations (a person then had to finish), the dev set has 2 false receipts, and two of the five wrong quotes are flagged for other fields, not the wrong one. The CAPABILITIES row states the 2 false receipts and that none of the 15 stopped traps then ended correct, but it does not say that K1 was met only through escalations, and it does not say that two wrong quotes were flagged on other fields rather than the wrong one. Please put those two facts in the CAPABILITIES row as plainly as RESULTS does, so the public row cannot be read as a stronger claim than the run supports.

No merge from me.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Gemini
Reviewed-Head: f3fdcc2

Reviewer: gemini-3.1-pro-preview, given the full diff against the merge base with claude/form-tx-weekend (124db5c98). This PR touches protected paths and the author is Claude, so it needs a reviewer from another vendor. Codex could not start: its local config.toml failed to parse.

What it checked:

  1. The PR body against RESULTS.md and the raw arm_B.jsonl rows. K1 (15 of 18), K2 (10 of 15), K3 (1 of 11) and K4 (5 wrong) match.
  2. Fail-closed behaviour in openadapt_flow:
    • _surface_error_result returns DELIVERY_UNCERTAIN after commit and HALTED_NEEDS_HUMAN before it.
    • _emit_auth_wall returns DELIVERY_UNCERTAIN on a mid-flight session expiry once a save was sent.
    • _verify_typeahead_choice halts when the input does not show the chosen suggestion.
    • _check_popup_entries_before_apply halts when popup inputs do not hold their values.
    • SummaryJudge marks a popup return NOT_CHECKED when its inputs were not checked and the displayed result did not match.
    • set_checkbox_or_radio raises SurfaceStateError when a click does not change the control.
      It found no fail-open path and no removed safety check.
  3. Runner changes: --suite, operator sign-in, and the by-hand estimator now off by default. None of them inflates scoring.
  4. CAPABILITIES.md and llms-full.txt against RESULTS.
  5. Secrets, GPL/AGPL material, real names: none found. Everything is synthetic.

New blockers: none.

Grok's earlier blocker on this head (the CAPABILITIES row):

  • (a) K1 was met only through escalations. Gemini rates this fixed: the row says "15 of 18 trap cases stopped before submit but none of those then ended correct". Grok reviewed the same head and asked for this to be said outright, so a one-clause edit would settle it for both reviewers.
  • (b) Not fixed, and this blocks. The row says "5 wrong submitted (all flagged after submit, none with a receipt)". That reads as if the layer caught every wrong value. RESULTS shows that for 2 of the 5 (fc-s02, gw-s04), the readback_incomplete flag came from other fields, not the wrong one. Please say this in the CAPABILITIES row as plainly as RESULTS does.

No merge from this review.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Codex
Reviewed-Head: 7fbb893

Codex run on 7fbb893, scoped to the delta since f3fdcc2.

The delta changes one benchmark row in CAPABILITIES.md and its mirror in llms-full.txt. Both match RESULTS.md and the 33 raw Arm B records.

Blockers

None.

Earlier blockers

  • (a) Fixed. K1 counted 15 of 18 trap cases that stopped before submission. Of those 15, 12 ended in escalation and 3 later submitted wrong quotes. None produced a correct quote.
  • (b) Fixed. All five wrong submissions raised a post-submit flag, and none received a receipt. The revised row identifies the two cases where readback_incomplete flagged other fields while the erroneous field went unchecked. Those unbound fields were client_no in fc-s02 and roommate in gw-s04.

Out of scope (follow-up)

None.

# Conflicts:
#	packages/flow/openadapt_flow/backends/_page_quiescence.py
#	packages/flow/openadapt_flow/form_tx/judge.py
#	packages/flow/openadapt_flow/form_tx/playwright_surface.py
#	packages/flow/openadapt_flow/form_tx/reconciler.py
The frame-routing surface reads the owner page's url at construction.
…ped settle

Main's TOP_TICKS_JS returns {ticks, stalled}. The root-frame check still
indexed it as a list (KeyError: 0). A stalled top window now falls back
to the screenshot settle, as _per_frame does.
…ct coverage

The coverage check credits each subject only with a distinct observation.
Values shown as page text (not in a control) were never counted, so every
text read-back became not_checked. Two read-backs on the same shown pair
still count once; an ambiguous pair counts none.
…o-filled controls from the ledger

A radio group got one ledger subject per option it touched, leaving one
uncovered. Use the group's first option as its selector (as on
claude/form-tx-rework, 5798bbc). The signer requires fields_filled_auto
to equal the distinct auto_fill subjects; a control filled again after a
sign-in counted twice and made the signer raise. Derive the count from the
same ledger.
…s read their reply

The weekend branch requires a pack to declare commit_url_patterns (or a
record lookup) before a save counts as confirmed. Fixture submit handlers
that navigated without reading the reply aborted the request after its
2xx, which the surface records as a failed save.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 6db50ad

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 6db50ad

Delta check of the merge of claude/form-tx-weekend 0c61aaf and its follow-ups: OK. All conflicts were resolved keeping both sides; nothing fail-closed was dropped. It carries the follow-ups from 2440, 2447 and 2449, and the fixtures declare commit endpoints. Finding (non-blocking): a 2xx save whose request is then aborted by navigation is recorded as failed, so a common await fetch(); location = ... page ends delivery_uncertain. The fixtures now read the reply; the engine behavior needs its own pinned test and an issue.

Local single-process runs (load under 15) passed on this head.

# Conflicts:
#	packages/flow/openadapt_flow/form_tx/reconciler.py
…ly again

The surface now takes a 2xx status as the save answer even when leaving
the page cuts the reply body off, so the fixtures go back to the common
`await fetch(); location = ...` pattern they were written with.
# Conflicts:
#	packages/flow/openadapt_flow/form_tx/playwright_surface.py
…wrapper

The actuation note added on claude/form-tx-weekend wraps _actuate_control;
the type-ahead pick's typeahead_query_chars argument must reach the inner
actuation.
@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 19d4763

Delta since 6db50ad: the merges of 1067e97 and cfdb87b, 89eed39 (test only: two fixtures go back to await fetch(); location = ...), and 19d4763 (the type-ahead query-length pass-through in the wrapper).

Conflicts:

Since the last approval, this head carries the #2429 engine commits (the 2xx save answer, the ledger check before signing, a signer refusal as a stop, and keying by sequence, popup and screen). Every _actuate_control call site in this head passes session and in_popup_subroutine, there is one signing site, and it is guarded by _unrecorded_actuations and the ValueError stop. I checked the call sites statically.

Own changes preserved: git diff cfdb87bf8 19d4763dc --stat gives 115 files, the same file set. In reconciler.py, the ledger-derived fields_filled_auto change from this branch no longer shows as a delta, because #2429 now carries the same change. The only other changes are the pass-through and the test fixtures. The merge base is cfdb87b, not ef4f5cc.

Tests: 136 passed on the targeted form_tx files. The run went through cpu-slots with a non-monorepo interpreter, with this branch's code first on PYTHONPATH. I did not run them myself.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant