Skip to content

omamobile-shell: the power-key flash test no longer races its own stand-in - #889

Merged
derekross merged 2 commits into
mainfrom
shell-keys-test-race
Nov 18, 2026
Merged

derekross merged 2 commits into
mainfrom
shell-keys-test-race

Conversation

@derekross

Copy link
Copy Markdown
Owner

The power-key test in packages/omamobile-shell/test/keys.sh failed CI on #850, which touches nothing in this package (run 44324012922): "flash: the saved brightness goes back only after the panel is off".

Cause: the stand-in for omarchy-brightness-display turned the fake panel off and then wrote panel-off to the call log. omamobile-keys polls the panel files every 50 ms, so on a loaded runner it could see the panel off and log its own lines before the stand-in's line landed. The failed run's log ends omamobile-sleepd now, then panel-off.

Fix: the stand-in writes its line just before it flips the files, and the three fixed sleeps after a press in this block become waits for the line the press ends with (up to 10 s).

Checked: with a 0.2 s pause put between the stand-in's two steps, the old order fails every time with the CI message and the new order passes. Six runs each under 42 busy loops passed for both, so plain load didn't reproduce it here; the widened gap did.

Test only: nothing the package installs changes, so no version bump.

🤖 Generated with Claude Code

derekross and others added 2 commits November 18, 2026 10:14
…nd-in

The stand-in for omarchy-brightness-display turned the fake panel off
and then wrote "panel-off" to the call log. omamobile-keys polls the
panel files every 50 ms, so on a loaded machine it could see the panel
off and log "brightnessctl ... set 2083" before the stand-in's own line
landed, and the test failed with "the saved brightness goes back only
after the panel is off" on a PR that touched nothing in this package
(CI run 44324012922, 2026-11-18). The stand-in now writes its line just
before it flips the files. With a 0.2 s pause put between the two steps
the old order fails every time with that message and the new one passes.

The three fixed sleeps after a press in this block (1.5 s, 1 s, 1 s) are
now waits for the line the press ends with, up to 10 s, so a slow
machine is waited for and a fast one loses no time.

Test only: nothing the package installs changes, so no version bump.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd-in again

The previous commit turned this case's fixed 1 s sleep into a wait for the
brightness line, which Hyprland's word produces at once. The stand-in's
delayed half (0.4 s) was then still pending when the next case put the
fake panel files back, and it turned that new panel off: with the power
key as Android's, "locked and lit: a press turns the screen off" then saw
a dark panel and woke it instead (CI run 44333336393). The sleep is back,
before the check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner Author

The first push failed CI on a different line ("locked and lit: a press turns the screen off", with the power key as Android's), and that one was this PR's own doing: turning the no-panel-files case's 1 s sleep into a wait let the stand-in's delayed half fire after the next case had put the fake panel files back, so that panel went dark behind the test. The sleep is back in that one case. Both key modes pass here four times each, and with the 0.2 s gap widened.

@derekross
derekross merged commit b3d26b1 into main Nov 18, 2026
2 checks passed
@derekross
derekross deleted the shell-keys-test-race branch November 18, 2026 15:47
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