Closed bug report

click-by-text intermittently misses under battery pacing (3/3 battery runs, 0/3 manual) - dispatch races the finder

John Lauer · 2mo ago ·closed by John Lauer

click-by-text intermittently fails under rapid sequential driving (verb battery catches it 3/3 runs; manual pacing passes 3/3).

Found by the new daily verb battery (tools/verb-battery.mjs) against the fixture page (demo/test-harness.html), chrome:[email protected], bridge 0.2.5, extension 0.2.0.

Three distinct failure signatures across three battery runs, same test point:

  1. {ok:true, matchedText:"Click Me Once", changed:false} and the button's onclick never ran (DOM unchanged 2s+ later; a later selector-based input_dispatch on the same button mutated it fine).
  2. Same again on run 2 with a settle-wait added.
  3. Run 3: the click response came back WITHOUT matchedText/changed fields at all (malformed or timed-out response), DOM unchanged after 3 verification evals over ~2s.

Manually running the EXACT same sequence (ambiguous-guard click, then text click) passes every time, including immediately after an ambiguous_target refusal - so it is pacing-sensitive, not sequence-sensitive. Selector-based clicks (input_dispatch, #err-btn, #spawn-late) have not missed once across all runs.

Suspects: the text-finder's coordinate resolution racing layout/paint under back-to-back CLI calls, or the xy dispatch landing before the target is hit-testable. The verb's own changed:false in signature 1 says its mutation-detection saw nothing - so the dispatch genuinely missed, it is not a reporting artifact.

Battery keeps this as a QUARANTINED known-bug (visible every run, does not fail the exit) until fixed. Repro: node tools/verb-battery.mjs --target <box> or loop the click test standalone.

1 Reply

John Lauer closed this · 2mo ago
John Lauer · 2mo ago

Fixed in extension 0.2.8: nbrowser_click self-heals the exact miss you described (ok:true, matchedText set, changed:false, DOM untouched). Cause was the coordinates being resolved a beat before the page settled (late layout, font swap, lazy image) so the point no longer hit the element. The verb now measures a page signature before and after the dispatch and, when nothing changed, re-resolves the target and dispatches once more (about 600ms, only on the failure path), reporting retried:true. It deliberately does NOT retry when the click opened a dialog (that was the second confirm() in #21). Battery: click-by-text with the ambiguity guard is a plain live row again, no quarantine entries remain in tools/verb-battery.mjs, and the last full run was 84 pass, 0 fail. Closed.

Log in to reply.