feat(alerts): a deploy_failed alert now says why #493
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!493
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/deploy-failure-alerts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Eight
deploy_failedalerts were firing at once, every one of them saying the same thing:Telling them apart meant querying
journal_outputin the database by hand. They turned out to be six unrelated causes — and npm-registry had been red since 2026-08-13 behind that message, on a Nix hash mismatch three lines from the end of a log nobody had a reason to open (#491 fixes that one).The actionable line is always in the journal. This puts it in the alert:
nix hash mismatch in forgegraph-registry-pnpm-deps.drv (pnpmDeps hash is stale)ERR_PNPM_NO_OFFLINE_TARBALL (pnpmDeps hash is stale)cp: cannot stat 'wrangler.beta.jsonc': No such file or directory…frappe-edge-proxy.service failed to startbetter-sqlite3 native install failed\wrangler deploy --name jobs-pulse-onebox` exited 1`deployFailureCausescans the last 4KB for known shapes, most specific first, and otherwise falls back to the last line carrying signal — skipping the git progress chatter these logs are mostly made of (remote: Enumerating objects…). Output is clamped to 180 chars so an alert stays readable.No journal yields the old message unchanged, so nothing regresses where there is nothing to say.
11 tests, each fixture taken from one of the eight real failures rather than invented. Typecheck clean.
🤖 Generated with Claude Code
8560f97a0ff555875acb