Skip to content

Fix fmtk E2E workspaces flake: tap_button_exact waits for a tappable node (#3588) - #3589

Merged
mcdonc merged 2 commits into
mainfrom
i3588-fix-fmtk-e
Oct 25, 2026
Merged

mcdonc merged 2 commits into
mainfrom
i3588-fix-fmtk-e

Conversation

@mcdonc

@mcdonc mcdonc commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the recurring tap_widget failed on s_9: web_gesture_not_supported flakes in the scheduled main E2E: fmtk Frontend Tests (workspaces) runs — 1 test on Oct 25 (run 40182792728), 5 tests on Oct 18 (run 39116591202). Closes #3588.

All the failures tap the shared-workspace card via tap_button_exact(name) after switching to the Shared with Me segment. The lookup picked the first button-typed node carrying the name as a whole line — and that node did not expose SemanticsAction.tap, so fmtk's tap_widget refused the gesture. A control's semantics can settle label-first (the button flag and label land before the tap action registers), and a non-tappable button-typed node can precede the real one in tree order; in either state hits[0] was never a usable target, because tap_widget can only tap nodes exposing the action.

tap_button_exact now prefers hits that expose the tap action and waits out the settle window (10s) before failing, with an error that names which of the two states it saw. All 42 call sites across the suites get the hardening.

Verification

  • test-fmtk-e2e src/frontend/e2e-tests/fmtk/test_terminals.py (fresh stack): 5/5 pass, including both Oct-18 cascade tests (test_gate_own_terminals_by_role, test_shared_terminal_spectator_watches).
  • test-fmtk-e2e src/frontend/e2e-tests/fmtk/test_sharing.py: the issue's failing test test_acl_editor_add_save_and_persisted_effect passes. (The module's chained scenarios 4-6 are locally load-sensitive when run standalone — see its docstring; CI runs the authoritative sequence.)
  • test-push: green.
  • The fmtk-e2e-workspaces workflow dispatched on this branch: see checks below.

…ics settling (#3588)

The shared-workspace card tap failed on the 2026-10-18/25 nightlies
with web_gesture_not_supported: the snapshot's first button-typed
node carrying the name as a whole line carried no tap action — a
control's semantics can settle label-first, and a non-tappable
button-typed node can precede the real one in tree order. tap_widget
can only tap nodes exposing SemanticsAction.tap, so such a hit was
never a usable target: hits that expose the action are preferred,
and the lookup waits the settle window out before failing with a
message that says which of the two states it saw.
@github-actions github-actions Bot added the backport/2.0 Merge also backports the squash commit to stable/2.0 (#3361) label Oct 25, 2026
Hedge the settle-window diagnosis (the nightlies' artifacts do not
distinguish label-settles-before-action from an untappable labeled
node preceding the tappable one — the code handles both), reconcile
open_fixture_workspace's stale 'shared tiles surface no tap actions'
comment with the fix's premise, note that FmtkError is load-bearing
for select_dialog_picker_value's mid-race catch (and give that call
a tight timeout), and extract the hit scan to keep the helper
simple.
@mcdonc

mcdonc commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Fresh-eyes review

Blocking issues

None.

Verification of prior findings

  1. Stale "shared tiles surface no tap actions" docstring — fixed. test_terminals.py:107-113 now reads "its merged semantics can surface the label before the tap action registers … when that happens (Fix fmtk E2E (workspaces) flake: tap on non-tappable merged button node (run 40182792728) #3588) — tap_button_exact waits out that window." The false steady-state claim is gone from the entire tree (rg "no tap actions|surface no tap" → zero hits), and the replacement documents the fix's actual behavior instead of contradicting it.
  2. Mechanism stated as fact — fixed. fmtkharness.py:2204-2215 now gives both hypotheses ("consistent with … semantics settle … or with a non-tappable labeled node preceding the real one in tree order; the nightlies' artifacts do not distinguish the two") and grounds the code's agnosticism ("Both states are unusable targets"). This is exactly the hedge requested.
  3. Accepted nits — all applied and correct:
    • FmtkError-is-load-bearing note at fmtkharness.py:2215-2217; accurate — the sole catching call site is test_sharing.py:266-267 (verified every other except FmtkError in the suite wraps wait_for_*/dart_logout, not tap_button_exact).
    • timeout=2 at test_sharing.py:266: failure inside the catch branch now bounded ~2-3s (one snapshot + sleep + snapshot past a 2s deadline) instead of 10s. No correctness loss — a raise there is caught, the outer loop re-reads state (has_text("Popup menu") / Add-ACE check) and retries; the success path is unaffected (timeout only bounds failure).
    • Hit-scan extracted to button_hits (fmtkharness.py:2234-2240); comprehension body identical to the inlined original — behavior-preserving. tap_button_exact drops back to xenon rank A (5 branches), button_hits is 3.

Regression bleed

None. git diff --stat 41e54bb0e..HEAD confirms the delta touches only the three reviewed hunks; the loop's selection, raise messages, and both FmtkError shapes are unchanged. button_hits has no name collision (2 grep hits: def + sole caller). Contract suite re-run on HEAD: scripts/tests/test_fmtk_harness.py — 23 passed.

Nits / questions

  • test_terminals.py:109-111 still tells only the same-node-settle story ("label before the tap action registers") while the harness docstring carries both hypotheses. It's hedged with "can" and cites Fix fmtk E2E (workspaces) flake: tap on non-tappable merged button node (run 40182792728) #3588, and the climb-failure it describes is real under that story — acceptable, but a "or a non-tappable twin precedes the button" clause would make the two docstrings fully consistent.
  • button_hits is now public API on FmtkClient with one caller; fine under the repo's no-leading-underscore rule, just noting the surface grew by one method.

Verdict

APPROVE — both important findings are genuinely fixed (stale claim eradicated, mechanism hedged, catch-dependency documented), the accepted nits are correctly applied, and the refactor is behavior-preserving with the contract suite green on HEAD.

@mcdonc

mcdonc commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

3D dependency graph (self-contained HTML)

The page is fully self-contained: save it from either link and it opens offline. GitHub serves the raw gist as plain text, so the source link downloads; the render link views.

@mcdonc
mcdonc merged commit b7a29e9 into main Oct 25, 2026
10 checks passed
@mcdonc
mcdonc deleted the i3588-fix-fmtk-e branch October 25, 2026 16:03
@mcdonc

mcdonc commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Successfully created backport PR for stable/2.0:

mcdonc added a commit that referenced this pull request Oct 25, 2026
…node (#3588) (#3589) (#3590)

* fmtk e2e: tap_button_exact prefers tappable hits and waits out semantics settling (#3588)

The shared-workspace card tap failed on the 2026-10-18/25 nightlies
with web_gesture_not_supported: the snapshot's first button-typed
node carrying the name as a whole line carried no tap action — a
control's semantics can settle label-first, and a non-tappable
button-typed node can precede the real one in tree order. tap_widget
can only tap nodes exposing SemanticsAction.tap, so such a hit was
never a usable target: hits that expose the action are preferred,
and the lookup waits the settle window out before failing with a
message that says which of the two states it saw.

* fmtk e2e: review follow-ups for #3589 (#3588)

Hedge the settle-window diagnosis (the nightlies' artifacts do not
distinguish label-settles-before-action from an untappable labeled
node preceding the tappable one — the code handles both), reconcile
open_fixture_workspace's stale 'shared tiles surface no tap actions'
comment with the fix's premise, note that FmtkError is load-bearing
for select_dialog_picker_value's mid-race catch (and give that call
a tight timeout), and extract the hit scan to keep the helper
simple.

(cherry picked from commit b7a29e9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.0 Merge also backports the squash commit to stable/2.0 (#3361)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix fmtk E2E (workspaces) flake: tap on non-tappable merged button node (run 40182792728)

1 participant