Repository navigation
Conversation
03dddd2 to
2a3ca6d
Compare
|
FWIW I reviewed this PR. The service-origin check looks correct for #10662: it excludes the watcher’s own crashing helpers while preserving notifications for genuine shell crashes. The focused suite passed all 34 checks, and the new regression failed against the original watcher as expected. Eight additional journal-replay cases also passed, covering ordinary Quickshell crashes, missing/empty service metadata, other users and mixed event streams. Two small test improvements would make this stronger:
I found no blocking issue in the production change and would support merging it in future (although I'm not empowered to do so!) |
|
Reviewed and verified on a disposable Omarchy worker VM (omarchy 4.0.4). The fix holds, and I pushed one test-only commit on top. Reproduced. I ran the real
Pushed 6366e01 to
Tests: Second opinion: Codex at medium effort reviewed the final head and found no defects. It agreed that #7155 changes the watcher's transport and keeps name-based self-exclusion, so whichever lands second needs this guard carried across. #8872 and #8881 bound Nothing is needed from you. GitHub has run no CI on this pull request yet, so it waits on that and then on the maintainer. |
|
The probe test reset the journal to the probe's crash alone, so the mute assertion after it ran against a stream with no Hyprland crash in it and passed whether muting worked or not. It now restores the Hyprland crash first. The guard is keyed on the service, so assert a quickshell crash outside it still announces, in the same stream as the probe's: excluding /usr/bin/quickshell by name would otherwise pass every check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6366e01 to
5ec56e1
Compare
|
Re-verified after the rebase onto Reproduced again. I ran the real
The CLI suite is not green, and the cause is on Second opinion: Codex at medium effort reviewed this head and found no defects. It agreed that the service the crash came from is the right signal, and that a genuine shell crash or the diagnosis started from the toast's #7155 is still open. Whichever of the two lands second needs this guard carried across. There's nothing for you to do. This waits on the |
A crash diagnosis can crash things itself. The agent reproduces the crash it is looking at (brave --help during a brave diagnosis), or the agent dies on its own (opencode during a WebKitWebProcess diagnosis). Each of those was announced like a new crash, offering a fresh agent per hop. The watcher knew a crash only by its name, and neither name matches its self-exclusion. omarchy-agent-crash now launches the agent with OMARCHY_CRASH_DIAGNOSIS=<pid>:<start epoch>. omarchy-agent carries it in every terminal command it starts, its install and warm-up relaunches included, as it does the account pin, because uwsm does not pass our environment on. Everything run from the agent's terminal inherits it, nested agent launches included. systemd-coredump journals the crashed process's environment as COREDUMP_ENVIRON, so the watcher reads that field (--all, because -o json turns a field over 4 KiB into null, and decoding the byte array the journal sends for an environment holding a non-UTF-8 or control byte). A crash carrying a marker younger than OMARCHY_CRASH_DIAGNOSIS_MAX_SECONDS (3600) is still announced, but without the diagnose action. Past that, a program the agent left running is offered like any other. An environment variable rather than the agent's cgroup, because uwsm names the terminal's unit after the command plus a random suffix, so there is no scope name to match. As a second guard, omarchy-agent-crash stamps the program under ~/.local/state/omarchy/crash-diagnosis, the base the crash-ignore flags use, adding a line with the diagnosis's marker to the stamp. The program counts as under way while any of those diagnoses is: for OMARCHY_CRASH_DIAGNOSIS_COOLDOWN_SECONDS (600) after its own start, and after that, up to the maximum, for as long as a process of ours still carries its marker. While it is under way the watcher announces that program's crashes without the action, which catches a reproduction started through omarchy-launch-browser in a systemd-run unit of its own that never inherits the marker. A line dated in the future, after a clock step, holds nothing, and lines past the maximum are dropped when the stamp is next written. A click on an older toast for a program under way says so and offers --again to start another anyway, added beside the first so the first keeps its guard however the two finish. The check and the stamp are taken under a lock, released before the agent starts, so two clicks cannot both dispatch. A click with no default agent goes to the agents panel and stamps nothing, rather than refusing every later click. This differs from omacom#13835, which mutes the diagnosed program's name while a lock is held for the agent's lifetime. It does not cover the agent itself crashing, and it silences a genuine crash of that program from ordinary use. Here the agent's own crash is caught by the marker, and no crash is ever silenced: a held crash still gets its toast, only without a second agent. The omacom#10662 self-exclusion is left to omacom#10680. Refs omacom#11992 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A crash diagnosis can crash things itself. The agent reproduces the crash it is looking at (brave --help during a brave diagnosis), or the agent dies on its own (opencode during a WebKitWebProcess diagnosis). Each of those was announced like a new crash, offering a fresh agent per hop. The watcher knew a crash only by its name, and neither name matches its self-exclusion. omarchy-agent-crash now launches the agent with OMARCHY_CRASH_DIAGNOSIS=<pid>:<start epoch>. omarchy-agent carries it in every terminal command it starts, its install and warm-up relaunches included, as it does the account pin, because uwsm does not pass our environment on. Everything run from the agent's terminal inherits it, nested agent launches included. systemd-coredump journals the crashed process's environment as COREDUMP_ENVIRON, so the watcher reads that field (--all, because -o json turns a field over 4 KiB into null, and decoding the byte array the journal sends for an environment holding a non-UTF-8 or control byte). A crash carrying a marker younger than OMARCHY_CRASH_DIAGNOSIS_MAX_SECONDS (3600) is still announced, but without the diagnose action. Past that, a program the agent left running is offered like any other. An environment variable rather than the agent's cgroup, because uwsm names the terminal's unit after the command plus a random suffix, so there is no scope name to match. As a second guard, omarchy-agent-crash stamps the program under ~/.local/state/omarchy/crash-diagnosis, the base the crash-ignore flags use, adding a line with the diagnosis's marker to the stamp. The program counts as under way while any of those diagnoses is: for OMARCHY_CRASH_DIAGNOSIS_COOLDOWN_SECONDS (600) after its own start, and after that, up to the maximum, for as long as a process of ours still carries its marker. While it is under way the watcher announces that program's crashes without the action, which catches a reproduction started through omarchy-launch-browser in a systemd-run unit of its own that never inherits the marker. A line dated in the future, after a clock step, holds nothing, and lines past the maximum are dropped when the stamp is next written. A click on an older toast for a program under way says so and offers --again to start another anyway, added beside the first so the first keeps its guard however the two finish. The check and the stamp are taken under a lock, released before the agent starts, so two clicks cannot both dispatch. A click with no default agent goes to the agents panel and stamps nothing, rather than refusing every later click. This differs from omacom#13835, which mutes the diagnosed program's name while a lock is held for the agent's lifetime. It does not cover the agent itself crashing, and it silences a genuine crash of that program from ordinary use. Here the agent's own crash is caught by the marker, and no crash is ever silenced: a held crash still gets its toast, only without a second agent. The omacom#10662 self-exclusion is left to omacom#10680. Refs omacom#11992 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A crash diagnosis can crash things itself. The agent reproduces the crash it is looking at (brave --help during a brave diagnosis), or the agent dies on its own (opencode during a WebKitWebProcess diagnosis). Each of those was announced like a new crash, offering a fresh agent per hop. The watcher knew a crash only by its name, and neither name matches its self-exclusion. omarchy-agent-crash now launches the agent with OMARCHY_CRASH_DIAGNOSIS=<pid>:<start epoch>. omarchy-agent carries it in every terminal command it starts, its install and warm-up relaunches included, as it does the account pin, because uwsm does not pass our environment on. Everything run from the agent's terminal inherits it, nested agent launches included. systemd-coredump journals the crashed process's environment as COREDUMP_ENVIRON, so the watcher reads that field (--all, because -o json turns a field over 4 KiB into null, and decoding the byte array the journal sends for an environment holding a non-UTF-8 or control byte). A crash carrying a marker younger than OMARCHY_CRASH_DIAGNOSIS_MAX_SECONDS (3600) is still announced, but without the diagnose action. Past that, a program the agent left running is offered like any other. An environment variable rather than the agent's cgroup, because uwsm names the terminal's unit after the command plus a random suffix, so there is no scope name to match. As a second guard, omarchy-agent-crash stamps the program under ~/.local/state/omarchy/crash-diagnosis, the base the crash-ignore flags use, adding a line with the diagnosis's marker to the stamp. The program counts as under way while any of those diagnoses is: for OMARCHY_CRASH_DIAGNOSIS_COOLDOWN_SECONDS (600) after its own start, and after that, up to the maximum, for as long as a process of ours still carries its marker. While it is under way the watcher announces that program's crashes without the action, which catches a reproduction started through omarchy-launch-browser in a systemd-run unit of its own that never inherits the marker. A line dated in the future, after a clock step, holds nothing, and lines past the maximum are dropped when the stamp is next written. A click on an older toast for a program under way says so and offers --again to start another anyway, added beside the first so the first keeps its guard however the two finish. The check and the stamp are taken under a lock, released before the agent starts, so two clicks cannot both dispatch. A click with no default agent goes to the agents panel and stamps nothing, rather than refusing every later click. This differs from omacom#13835, which mutes the diagnosed program's name while a lock is held for the agent's lifetime. It does not cover the agent itself crashing, and it silences a genuine crash of that program from ordinary use. Here the agent's own crash is caught by the marker, and no crash is ever silenced: a held crash still gets its toast, only without a second agent. The omacom#10662 self-exclusion is left to omacom#10680. Refs omacom#11992 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A crash diagnosis can crash things itself. The agent reproduces the crash it is looking at (brave --help during a brave diagnosis), or the agent dies on its own (opencode during a WebKitWebProcess diagnosis). Each of those was announced like a new crash, offering a fresh agent per hop. The watcher knew a crash only by its name, and neither name matches its self-exclusion. omarchy-agent-crash now launches the agent with OMARCHY_CRASH_DIAGNOSIS=<pid>:<start epoch>. omarchy-agent carries it in every terminal command it starts, its install and warm-up relaunches included, as it does the account pin, because uwsm does not pass our environment on. Everything run from the agent's terminal inherits it, nested agent launches included. systemd-coredump journals the crashed process's environment as COREDUMP_ENVIRON, so the watcher reads that field (--all, because -o json turns a field over 4 KiB into null, and decoding the byte array the journal sends for an environment holding a non-UTF-8 or control byte). A crash carrying a marker younger than OMARCHY_CRASH_DIAGNOSIS_MAX_SECONDS (3600) is still announced, but without the diagnose action. Past that, a program the agent left running is offered like any other. An environment variable rather than the agent's cgroup, because uwsm names the terminal's unit after the command plus a random suffix, so there is no scope name to match. As a second guard, omarchy-agent-crash stamps the program under ~/.local/state/omarchy/crash-diagnosis, the base the crash-ignore flags use, adding a line with the diagnosis's marker to the stamp. The program counts as under way while any of those diagnoses is: for OMARCHY_CRASH_DIAGNOSIS_COOLDOWN_SECONDS (600) after its own start, and after that, up to the maximum, for as long as a process of ours still carries its marker. While it is under way the watcher announces that program's crashes without the action, which catches a reproduction started through omarchy-launch-browser in a systemd-run unit of its own that never inherits the marker. A line dated in the future, after a clock step, holds nothing, and lines past the maximum are dropped when the stamp is next written. A click on an older toast for a program under way says so and offers --again to start another anyway, added beside the first so the first keeps its guard however the two finish. The check and the stamp are taken under a lock, released before the agent starts, so two clicks cannot both dispatch. A click with no default agent goes to the agents panel and stamps nothing, rather than refusing every later click. This differs from omacom#13835, which mutes the diagnosed program's name while a lock is held for the agent's lifetime. It does not cover the agent itself crashing, and it silences a genuine crash of that program from ordinary use. Here the agent's own crash is caught by the marker, and no crash is ever silenced: a held crash still gets its toast, only without a second agent. The omacom#10662 self-exclusion is left to omacom#10680. Refs omacom#11992 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fixes #10662
The watcher excluded its own crashes by executable name. Its notification health probe runs inside
omarchy-crash-watch.servicebut can crash asquickshell, so the event bypassed that guard and re-entered the same notification path.This reads
COREDUMP_USER_UNITfrom the existing journal record and drops events attributed to the watcher’s own service before starting notification work. A normalquickshellcrash outside that unit is still reported.Tests:
bash test/shell.d/crash-capture-test.shgit diff --check./test/all: CLI passed; shell passed 234/235 files. The remainingconfig-test.shpackage-manifest failure also occurs on an unmodifiedquattrocheckout.#7155 changes the watcher’s transport but retains name-based self-exclusion, so it does not cover this failure mode. If it lands first, this provenance guard will need to be carried into that implementation.