Repository navigation
Stop the test shell's whole process group so its plugin watcher dies with it - #14545
omarchybot wants to merge 6 commits into
Conversation
Shell tests stopped a background Quickshell with SIGTERM to its pid alone. Quickshell exits without reaping its Process children, so PluginRegistry's inotifywait plugin watcher was reparented to init and lived on, watching a deleted fixture home and holding the harness's inherited descriptors, the run-shell-tests lock among them. plugin-registry-contract and screenshot-sanity each left one per run. Start Quickshell under setsid and stop it with a group kill. The kill no longer waits on kill -0 against the shell's pid, so a shell that already died still has its children cleaned up. Fixes #7124 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryThe PR puts QML fixtures and the tray-menu test’s Quickshell in separate process groups. Cleanup stops those groups, including children left behind after Quickshell crashes.
Reviews (5) · Last reviewed commit: "Merge quattro to pick up the default age..." · Reviewed by Greptile |
runtime-smoke-test.sh takes quattro's version: it now sweeps every process carrying the test's scratch OMARCHY_PATH after stopping the shell, with a KILL fallback, which already covers the watcher this branch stops with a group kill. The other eleven tests keep the group kill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Brought this across to current The merge. The one conflict was What ran, on a disposable Omarchy worker VM with a Hyprland session:
Second opinion: Codex Medium, given the ported diff. It found no defect. It agreed the Related: #11385 adds Waiting on the maintainer: the six pre-existing |
quattro moved nine of the tests this branch changed onto the shared run_qml_fixture harness in base-test.sh (#16339), and deleted lock-password-overflow-test.sh and screenshot-sanity-test.sh. Those files now match quattro, and the fix moves into the harness instead: run_qml_fixture starts Quickshell under setsid, and both its re-run and qml_fixture_cleanup stop the whole group with stop_process_group, so every run_qml_fixture test is covered at once. tray-menu-test.sh still starts its own shell and keeps the per-test fix. The scratch-shell tests, input-devices-test.sh and shell-idle-spawn-test.sh already stop their own children. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Brought this across to current The merge. #16339 moved nine of the tests this branch changed onto a shared What ran, on a disposable Omarchy worker VM with a Hyprland session:
Second opinion: Codex Medium and muse-wonder via pi, thinking high, given the ported diff. Neither found a defect. Both confirmed that Related: #11385 and #16154 add Waiting on the maintainer. The five failures above already fail on |
|
This has stopped merging cleanly again, and this time I have not brought it across: What fixed it. 48956c8 (#17388) changed What ran, on a disposable Omarchy worker VM with a Hyprland session:
What this pull request still has that
Second opinion: Codex Medium, asked from the code alone whether Waiting on the maintainer, with a recommendation to close this, and #7124 with it, since 48956c8 fixed it on |
Keep current fixture cleanup and tray coverage while stopping children after Quickshell crashes. Fold the TERM grace period and KILL fallback from #17392 into the shared process-group helper, waiting for Quickshell only after escalation so an unresponsive leader cannot hang cleanup. Exercise a real plugin watcher stopped before its Quickshell is killed, proving cleanup reaches orphaned children and escalates when TERM cannot run. Co-Authored-By: David Heinemeier Hansson <david@hey.com> Co-Authored-By: GPT-6 <noreply@openai.com>
The registry fixture can write its result before the asynchronous watcher startup chain finishes. Wait up to three seconds for the real child before killing Quickshell, so scheduler delays do not turn the cleanup regression into a startup race. Co-Authored-By: Opus 5.5 High <noreply@anthropic.com> Co-Authored-By: GPT-6 <noreply@openai.com>
|
Updated this branch onto Verified on a disposable Omarchy worker with a real Hyprland session. The regression test starts the real plugin-registry fixture, stops its
Checked by GPT-6 in Codex (reasoning effort not exposed), with reviews by Opus 5.5 High and muse-wonder via pi, thinking high. Opus found the watcher-start race addressed by the bounded wait; both reviewers found no defects on the final head. Their agreement is not guaranteed independent of this review. Waiting on the maintainer for the five failures already present on the base. The change is labelled |
|
CI run 45054685184 failed only On a fresh disposable Omarchy worker with Hyprland, the test fails the same way at both the CI base ( Checked by GPT-6 in Codex (reasoning effort not exposed), with Opus 5.5 High and muse-wonder via pi, thinking high. Both reviewers agreed with the cause and disposition; their agreement is not guaranteed independent of this review. Nothing was pushed and CI was not rerun. The existing |
CI run 45054685184 tested a base that removed the omarchy-shell stub before the default agent picker called it. Worker bisect found 7d696f7 keeps the stub through that call and fixes the failure. Merge the fixed base to test the PR alongside that correction. The worker CLI suite and the focused default-agent, plugin-registry and tray tests pass. The same assertions fail on the merged tree and current quattro in agent-resume-test.sh, provision-owner-keyboard-test.sh and runtime-smoke-test.sh.
|
Recommend: Hold — three shell tests still fail on the worker, including on I merged On a disposable worker, the plugin-watcher regression failed on GPT-6.2 Sol High in Codex checked the results. Opus 5.5 High and muse-wonder via pi, thinking high, reviewed the merge tree, and Opus 5.5 High found no actionable issues in the final review. The reviewers could access the driver’s work. |
Every
./test/shellrun left orphanedinotifywait -m -rprocesses behind, reparented to init, each watching a fixture home the test had already deleted and holding the harness's inherited descriptors, therun-shell-testslock among them. A later run could then block on a lock held by a process that outlived the suite that took it.The shell tests start Quickshell in the background and stop it with
kill "$QS_PID", which signals Quickshell alone. Quickshell exits on SIGTERM without reaping itsProcesschildren, soPluginRegistry'slocalPluginWatcher(shell/services/PluginRegistry.qml:663) survives it.plugin-registry-contract-test.shandscreenshot-sanity-test.sheach leave one per run.The twelve tests that start a background Quickshell now start it under
setsidand stop it withstop_process_group, a new helper inbase-test.shthat kills the whole group and then waits on the shell. In these non-interactive scripts the background job is never a group leader, sosetsidexecs in place and$!is both the shell's pid and its group id; the group is separate from the test's own, so the kill cannot reach the test or the harness. Cleanup no longer checkskill -0against the shell's pid first, so the children of a shell that already crashed are still stopped.This fixes the tests, not
PluginRegistry.qml. The live session does not leak, becauseomarchy-restart-shelltakes the shell down gracefully, and a group kill covers every child a test shell starts rather than this one watcher.background-intro-clone-test.shandbackground-instant-reload-test.shkeep their own teardown: their fixtures quit on their own, and their children are short helpers rather than an indefinite watcher.Reproduced on a disposable Omarchy worker VM with a Hyprland session. On
quattroat 902fd8a, the full shell suite left two orphaned watchers; run singly,plugin-registry-contractandscreenshot-sanityleft one each. On this branch the full suite and each of those tests left none. All twelve changed tests pass. Reviewed by Claude Opus 5.5 and by Codex Medium as a second opinion; Codex found no defect, checked thesetsidfork condition against util-linux's source, and agreed the change is proportionate. Its independence from the first review is not guaranteed.Fixes #7124