Repository navigation
Keep supervising the shell through a slow compositor resume - #11827
devYRPauli wants to merge 8 commits into
Conversation
compositor_alive gives Hyprland three queries and two 0.5s sleeps before it reports the session gone. Resume from suspend holds the outputs down for tens of seconds, so a live compositor reads as a dead session. The supervisor stands down, the shell that held the ext-session-lock is never relaunched, and the seat stays locked with no locker to authenticate against. Wait past those three queries while Hyprland's IPC socket is still there, and log the give-up path so it shows in the journal. Fixes omacom#11820 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Open external pull requests: 39 -> 40. The new one is omacom/omarchy#11827, which keeps the shell supervisor alive through a slow compositor resume. Merged stays at 97 across the same 38 projects. Upstream issues stay at 16. Closed unmerged stays at 37. No table row moved. The table still covers 52 merges across 11 projects, so the remainder stays at 45 across 27. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Automated AI review
Outcome: The change is not shown to fix #11820, which
|
A signal during the socket wait makes compositor_alive return 1, and the caller then logged that the compositor stopped answering. Exit before that log line when the launcher is terminating. The tests now cover that case, report the socket cases as skipped when the sandbox refuses the bind, and give the no-socket case a signature so the -S check is reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge. SummaryThe shell supervisor now waits longer for Hyprland to recover when its IPC socket still exists.
No new actionable issues found.
|
On a5a1c4a, |
|
Reviewed at a5a1c4a against Reproduction. This ran on a disposable worker built from the Omarchy ISO, with real Hyprland and the real Tests on the worker. Second opinion. Codex Medium reviewed the diff and found no defect introduced here, agreeing that the change is proportionate. Its independence is not guaranteed. It confirmed one point Greptile raised: if a signal arrives during the half-second sleep and the next query answers, the launcher logs "relaunching", or "Giving up" with exit 1 when the attempt budget is spent, before it exits at the top of the loop. It never starts another shell, and the three-query loop on Overlap. #13490 also reworks Nothing is waiting on you. This is with the maintainer. |
|
Reviewed at a5a1c4a against Reproduction. This ran on a disposable worker built from the Omarchy ISO, with real Hyprland and the real Tests on the worker. Second opinion. Codex Medium reviewed the diff and found no defect introduced here, agreeing that the change is proportionate. Its independence is not guaranteed. It confirmed one point Greptile raised: if a signal arrives during the half-second sleep and the next query answers, the launcher logs "relaunching", or "Giving up" with exit 1 when the attempt budget is spent, before it exits at the top of the loop. It never starts another shell, and the three-query loop on Overlap. #13490 also reworks Nothing is waiting on you. This is with the maintainer. |
|
Correction: the comment just above repeats the previous review of a5a1c4a and was posted by mistake. This is the review of the current head. Re-reviewed at 2c73dca against The new commit. The Reproduction, repeated at this head. This used real Hyprland and the real Suites on the worker. In Second opinion. Codex Medium re-reviewed the delta and found no defect. Its independence is not guaranteed. It confirmed that the fake Overlap. #13490 and #10709 also change Nothing is waiting on you. This is with the maintainer. |
quattro now runs the launch-shell test against a scratch copy of the supervisor with its sleeps shortened. The resume cases keep their socket environment and run that copy too, which also shortens the 60-step resume wait to 3s, so the 30s timeout from quattro is enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test now runs a copy of the supervisor whose resume wait is shortened to about 3s, so a wait that ignored the signal could still finish inside the 2s allowance and pass. Probes made after the signal show whether the wait stopped, whatever the wait's length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…duler The stub truncated the counter before writing it, so the snapshot taken before the signal could read it empty, count from zero and fail a correct supervisor. Ten probes after the signal still separates a wait that stops from one that runs on, which makes about 58. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
This stopped merging cleanly after #15412 changed
Checked on a worker built from the Omarchy ISO, at fa17474 against
The change is proportionate to the problem. As you say in the description, it doesn't confirm the cause of #11820, so it is not linked as closing it. Codex Medium reviewed it over three rounds. The test fixes above came from its findings, and its last round found nothing. It also pointed out that a foreground Nothing is left for you. It's waiting on the maintainer. |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
I read the launcher and regression-test diff at ed8d16d against The full review and worker tests have not run for this head. The earlier verification applies to fa17474, and has not been carried forward. No changes were pushed. This is waiting on the maintainer to resolve classification; nothing is requested from you. |
Refs #11820.
compositor_aliveallows threehyprctlqueries and two 0.5s sleeps. When all three fail, the supervisor reads the session as tearing down, exits 0 and never relaunches the shell. When the shell that died held theext-session-lock, the seat stays locked with no locker to authenticate against. A TTY or a reset is the only way back in.The guard is right to exist. Relaunching into a session that is going away burns the attempt budget. What it lacks is a way to tell "not answering yet" from "gone".
Hyprland's IPC socket is that signal, and the repo already reads it that way.
omarchy-upgrade-to-quattro:294validates a signature by testing.socket.sock, andcompositor_reachableinbase-test.shprobes a socket before it trustshyprctl. This change keeps the three fast queries. Then, while the socket is present, it polls up to 60 more times, 0.5s apart. Without a socket it gives up at once. A poll to a compositor that accepts the connection but does not answer takes up to 5s more, which is thehyprctlread timeout. So 30s is the wait when the compositor refuses the connection, not a bound for a stalled compositor.The wait checks
terminatingbefore each poll. The supervisor also checks it after a successful probe, before consuming the restart budget or logging a relaunch, so teardown takes the clean-exit path. The give-up path writes aloggerline, and a teardown does not write it. Neither existing message appears in the reporter's journal on any boot, which is why the failure reads as nothing happening at all.This does not confirm the cause of #11820. With no outputs,
hyprctl -j monitorsstill exits 0 with[], so an output blackout alone does not fail the guard. The change covers a compositor that keeps its socket but does not answer IPC. On the next occurrence, the new journal line, or its absence, shows whether that was the path.Measured with the three shell test files that reach the launcher:
launch-shell-test.sh,restart-shell-test.shandcompositor-guard-test.sh.8b4eae66With the tests from this branch and the launcher from
8b4eae66,launch-shell-test.shstops at:Each added case fails against a mutant of the launcher:
terminatingcheck in the waita teardown during the wait ends supervision promptly, after 30sterminatingcheck before theloggerlinea teardown during the wait is not logged as a compositor that stopped answeringcompositor_socket_presentchecks only the signaturea compositor that left no socket ends supervisionThe socket fixture binds a real AF_UNIX socket the way
compositor-guard-test.shdoes. When the sandbox refuses the bind, the two cases that need it report# SKIP../test/clireports the same one failure before and after,main help includes hardware group, which my macOS checkout produces on both sides.Greptile identified a teardown race during a successful recovery probe and the short resume fixture. Fixed in 2c73dca. The new signal-on-success case fails on the previous head because it logs a relaunch. The resume fixture now rejects 62 queries before answering on the final recovery poll, exercising about 30 seconds of waiting. Its deadline is 45 seconds. A mutant reducing the recovery loop from 60 polls to 20 fails the slow-resume case. All three focused shell test files pass, 29 checks and no skips; Bash syntax and
git diff --checkalso pass