Skip to content

test(linux): wait for AT-SPI rows before toggling (settings-poll flicker) - #47

Merged
Negative-Star-Innovators merged 1 commit into
mainfrom
fix/atspi-toggle-row-flicker
Oct 1, 2026
Merged

Negative-Star-Innovators merged 1 commit into
mainfrom
fix/atspi-toggle-row-flicker

Conversation

@Negative-Star-Innovators

Copy link
Copy Markdown
Owner

Fixes the AT-SPI flake that turned the main Build Linux x64 leg red after #46 merged (run 36803538442).

Cause

toggle_keyword / toggle_keyword_case / toggle_regex read their target state from the panel-derived dict with a bare self.keywords()[text] / self.regexes()[pattern]. A just-added row can briefly disappear from the panel when the GUI's 1-second settings-poll reload rebuilds it, so that read races the rebuild and dies with KeyError. Both failures on main were exactly this (test_keyword_case_button → KeyError: 'Project Chimera' at gui_atspi.py:723, test_regex_toggle_and_delete → KeyError: '\bPN-\d{5}\b' at :797); the same commit passed the PR run and the arm64 leg. Product code is unaffected — the engine is the source of truth throughout.

Fix

Add _keyword_state / _regex_state helpers that wait_until the row is present before indexing, and use them in the three toggle helpers — the same eventual-consistency pattern press_until and set_text_refound already apply for this reload in the driver.

Notes

  • Test-driver change only; verified locally with py_compile (the AT-SPI suite needs Linux + display + AT-SPI bindings, so it runs in CI, not on this Windows dev box)
  • The failed main job was also re-run separately to get the branch green again

…ker)

The toggle helpers read their target from the panel-derived dict with a
bare keywords()[text] / regexes()[pattern]. A just-added row can briefly
vanish from the panel when the settings-poll reload rebuilds it, so that
read races the rebuild and dies with KeyError — this flaked on main
(build-linux x64 leg, run 36803538442: test_keyword_case_button and
test_regex_toggle_and_delete both failed this way; same commit passed on
the PR run and on arm64).

Add _keyword_state/_regex_state helpers that wait_until the row is present
before indexing and use them in toggle_keyword, toggle_keyword_case and
toggle_regex — the same eventual-consistency pattern press_until and
set_text_refound already apply elsewhere in the driver.
@Negative-Star-Innovators
Negative-Star-Innovators merged commit e35b4c0 into main Oct 1, 2026
18 checks passed
@Negative-Star-Innovators
Negative-Star-Innovators deleted the fix/atspi-toggle-row-flicker branch October 1, 2026 04:35
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