crashes 1.0.0: systemd-coredump crash history with one-click AI diagnosis - #537
Open
UmedjonBA wants to merge 2 commits into
Open
crashes 1.0.0: systemd-coredump crash history with one-click AI diagnosis#537UmedjonBA wants to merge 2 commits into
UmedjonBA wants to merge 2 commits into
Conversation
…osis New plugin. Crashes of your own processes (matched by uid) are announced with a critical notification and kept in a panel afterwards, so one you missed is still there later: program, signal, time, PID and whether the core file still exists. Each row can hand the crash to a terminal AI coding agent together with a bundled, evidence-first investigation guide (coredumpctl, OOM checks, timeline correlation, gdb + debuginfod symbolization, honest reporting, read-only), or mute notifications for that one program. A second tab lists the current boot's journal errors by severity with the same per-entry diagnosis. Filtering runs in coredumpctl/jq outside the Luau runtime, at most 30 rows are parsed per poll, and the journal is only queried when its tab is open. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three fixes found while using the plugin. **Diagnosis fell over when the agent could not answer.** The first installed agent was opened whether or not it worked, so an account that had run out of quota — or was simply signed out — produced a terminal with an error in it and nothing else. The known agents are now tried in turn: the chain runs in the terminal that just opened, asks each one a throwaway question, and moves on to the next when the answer does not come. Which one was chosen is visible in the window. It costs one tiny request per diagnosis, so it can be turned off with `probe_agent`, and `agent_order` decides who goes first. A configured `agent_cmd` is still used on its own: its headless syntax is unknown, so it cannot be tested this way. **Agents behind a proxy could not connect.** A panel click inherits neither the shell profile nor anything exported in it, so a proxy or an API key set there never reached the agent. The new `env_file` setting is sourced before it starts. **Two icons never rendered.** `ui.glyph` takes `name`, not `glyph`; with the wrong prop the icon is silently dropped and the rows lost their bug marker. Verified by building the launch command the panel produces and running it against stub agents: one that reports a usage limit is skipped in favour of the next, and with none available the terminal explains what to install rather than sitting empty. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
Pushed three fixes found while running the plugin day to day, all in the same 1.0.0 (nothing here has been released yet):
The fallback was checked by taking the exact launch command the panel builds and running it against stub agents — one reporting a usage limit is skipped for the next, and with none available the terminal says what to install instead of sitting empty. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin
umedbazarov/crashesplugin.toml)What it does
Turns systemd-coredump into something you actually notice and can act on. When one of your processes dumps core, a critical notification appears — and, unlike a toast, the crash stays in the panel afterwards, so one that happened while you were watching a video is still there when you come back: program, signal, time, PID, and whether the core file still exists.
Each row offers two actions:
diagnose.md: readcoredumpctl info, rule out OOM kills first, correlate the timestamp with filesystem mtimes / the journal / recent package updates, symbolize the backtrace with gdb + debuginfod, and report what the evidence proves versus what is inference. The guide is explicit that diagnosis is read-only and that a core dump is a verbatim copy of process memory which may hold secrets.A second tab lists the current boot's journal errors at a chosen severity (
errand stricter, up toemergonly) with the same per-entry diagnosis, which asks the agent to pull the surrounding journal context before judging the message.Only your own uid's crashes are shown: a system daemon dumping core is a sysadmin's problem, not a desktop notification.
External dependencies
Declared in
dependencies:coredumpctl(the crash source),jq(filters the list outside the Luau runtime),notify-send(notifications),bash(launches the diagnosis command). An AI agent is optional in the sense that the panel works without one — the diagnosis button then tells you what to install; no agent name is hardcoded as required, andagent_cmdis configurable. Left empty, the known agents are tried in turn until one answers, so a signed-out or out-of-quota agent does not leave you with an empty terminal.gdb/debuginfod are optional and only used by the agent if present.Testing
Exercised against real coredumps plus a deliberately crashed process (
kill -SEGV): notification fired within a second, the new crash appeared in the panel, mute/unmute persisted across a shell restart, rotated-away dumps were correctly marked and their diagnosis button disabled, the Errors tab returned journal entries at each severity, and both diagnosis buttons opened the agent with the right prompt.noctalia plugins lintclean; no CPU-budget errors in the shell log across repeated opens and refreshes.Screenshots / Videos
Checklist
Ready-for-review requirement: Every box in this section must be checked. If any statement is not true, keep the
pull request as Draft. An explanation does not replace a required check.
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
Ready-for-review requirement: Every attestation below must be checked.
licensedeclared inplugin.toml.