register_global_hotkeys path is structurally untested, and has cost time three times in two daysExtracted verbatim from test-assist/TESTASSIST_BACKLOG.md (TFP-045), where
it was one entry inside a 113KB backlog file. Source material for the
find-the-hidden-platform skill.
testing, quality, technical-debtProblem it solves: FloatingLauncher’s register_global_hotkeys
parameter defaults to False, because the True path claims real,
process-wide OS state via RegisterHotKey that concurrent tests would
fight over. That is a sound precaution, and it leaves an entire code path
exercised only by five Windows-only skipif tests. The cost is no longer
hypothetical — it has surfaced three times in two days, each time in a
different way:
5c5e0a1. _apply_hotkey_labels() still
addressed _btn_photo and _btn_video after the launcher rebuild
removed them. The app died on startup with an AttributeError while
350 tests stayed green, because that method runs only when
register_global_hotkeys=True and every test avoids it.aca5463. Three TA-211 tests referenced the
same removed attributes. They are skipif-guarded to Windows, so every
run on a Mac reported green by construction — the only tests that
would have failed were the ones that never ran. It surfaced on someone
else’s Windows machine, which is the worst place to find it.TestAssist.exe left
running from the manual capture check still held the real Win32
hotkeys, so the TA-211 tests’ own RegisterHotKey calls failed. Three
phantom failures that read as a code regression during a release.
Correctly diagnosed as leftover process state rather than written off
as flaky — but only after investigation, mid-release.The shape was already named in docs/SESSION_HANDOVER_2026-09-11.md §7.2
(“paths the suite deliberately avoids”). This ticket is the evidence that
the shape costs real time, and the record that stops a fourth occurrence
being re-derived from scratch.
Three distinct sub-problems wear this one label, and they have different remedies:
True path that need no OS call —
principally that _apply_hotkey_labels() addresses widgets that exist —
can be tested without one. Partly addressed already: 5c5e0a1’s test
sets _hotkey_registered directly rather than registering for real.skipif-guarded test rots silently
between the runs that actually execute it. Partly addressed already:
test_LAUNCH_09_every_launcher_attribute_this_suite_names_exists scans
the suite for launcher.<attr> references and asserts a real launcher
has each one — and it runs everywhere, including where the guarded tests
are skipped.RegisterHotKey is behaving
correctly and the test is asserting the right thing — but the diagnosis
is invisible from the failure message.Both (A) and (B)’s mitigations currently exist only on ui-polish
(PR #19), deferred to 1.5.0. Their real-world instances were caused by
the launcher rebuild on that same branch, so 1.4.0 is not exposed to
those two — but the mechanism they guard is general, not rebuild-specific.
RegisterHotKey holder and reports it as a named skip
or an explicit failure — “Alt+P is held by another process; close any
running Test Assist (check the tray)” — rather than a bare assertion
failure that reads as a code regression.main independently of the
launcher rebuild, or wait and arrive with PR #19 in 1.5.0. Decide it;
do not let it default by inaction.2026-09-16 (later) — (C) closed. hotkeys_available, a fixture in
test_regressions.py, probes the same three combinations
_register_hotkeys() registers (claim-and-release with a throwaway id,
MOD_NOREPEAT included to match GlobalHotkeyManager.register()
exactly) and is applied to the four tests that construct a real launcher
with register_global_hotkeys=True for reasons other than deliberately
testing a conflict — test_TA211_global_hotkeys_register_and_are_advertised,
test_TA211_global_hotkey_dispatch_routes_to_the_right_action,
test_TA211_an_unrelated_native_message_is_ignored,
test_TA211_hotkeys_are_released_on_close.
test_TA211_a_failed_registration_is_surfaced_and_not_advertised is
deliberately left without it, per this ticket’s own Scope — it exists to
create exactly the condition the precondition detects, on purpose.
Verified end to end, not just read from the code: with Alt+P claimed
from an external process, the four guarded tests now skip with Alt+P is
held by another process; close any running Test Assist (check the
tray) instead of failing; the excluded test fails at its own setup
assertion in that same run, which is expected and correct — it has no
precondition by design, and a real external conflict coinciding with its
own simulated one is exactly the contrived case it isn’t equipped for.
test_TA230C_precondition_names_a_deliberately_held_hotkey covers the
ticket’s own acceptance bar (claims Alt+P from the test itself, same
pattern as the excluded test, asserts the precondition names it
specifically). (A) and (B) were already confirmed closed earlier this
session (see the 1.5.0 status section above) — all three sub-problems
are now closed. The convention note is in docs/WORKING_AGREEMENTS.md’s
“Two things already learned here” section, a third entry alongside the
two this ticket’s own text already referenced.