feat(incidents): root-cause grouping into incidents (#58) #68
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!68
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/58-incidents"
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?
What changed
PR #68 at
a9694a4: root-cause grouping with F4 (effects of a resolved root count) and F5 (ignoring a root hides its whole incident, including effects further down the chain) fixed with regression tests; mix precommit passes with 1035 tests; Nye's Chromium grouping check passed at 390px and desktop on the previous head (C43).Fixes #58
Red, then green
bash -c 'export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset $(env | grep -oE "^(FORGEJO|GITHUB_ISSUES)[A-Z_]*"); MIX_TEST_PARTITION=_58 MIX_ENV=test mix test test/lamplighter/incidents_test.exs test/lamplighter_web/live/incidents_live_test.exs test/lamplighter_web/live/dependency_settings_live_test.exs'0c7eab5): exit 189f2781): exit 0Checks
89f2781(compile with warnings as errors, format check, full suite). (Upper Wolfjaw):bash -c 'export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset $(env | grep -oE "^(FORGEJO|GITHUB_ISSUES)[A-Z_]*"); MIX_TEST_PARTITION=_58 mix precommit', exit 0bash -c 'cd /home/peak/work/lamplighter-v1-2/wt-58 && export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset $(env | grep -oE "^(FORGEJO|GITHUB_ISSUES)[A-Z_]*"); ids=$(mix run /tmp/seed58.exs 2>/dev/null | grep -o "ROOT=[0-9]* EFFECT=[0-9]*"); r=${ids#ROOT=}; r=${r%% *}; e=${ids##*EFFECT=}; cd ../checks && ~/.venvs/pw/bin/python incidents_browser.py $r $e', exit 0python3 /home/peak/work/lamplighter-v1-2/review58/incidents_browser.py, exit 04c4a400my F4 test, the incidents tests, the full suite (1037) and the Chromium grouping check at 390px and desktop all pass. (Nye):cd /home/peak/work/lamplighter-v1-2/lamplighter-58 && test "$(git rev-parse --short HEAD)" = 4c4a400 && source ../env.sh 2>/dev/null; E=$(ls -d ~/.local/share/mise/installs/elixir/*/ | head -1); O=$(ls -d ~/.local/share/mise/installs/erlang/*/ | head -1); export PATH=$E/bin:$O/bin:$PATH MIX_HOME=$E/.mix MIX_TEST_PARTITION=58; mix test 2>&1 | tail -3 | grep -q " 0 failures\|passed" && cd .. && python3 review58/incidents_browser.py | tail -1 | grep -qx ok, exit 0a9694a4, mix precommit passes (1038 tests) and the recursive ignore query is cycle-safe and used in both list and status counts. Untested: browser after F5, API ignored flag for effects, performance on large tables. (Prover):bash -c 'cd /tmp/pv58 && export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)"; unset $(env | grep -oE "^(FORGEJO|GITHUB_ISSUES)[A-Z_]*"); MIX_TEST_PARTITION=_pv MIX_ENV=test mix test test/lamplighter/incidents_test.exs test/lamplighter/nye_incident_status_test.exs', exit 0Found and fixed
Risks
The F5 fix is a query change only (recursive check up parent_report_id); not re-run in a browser since C43. The ignored list page still lists only the root, not its hidden effects. Merges after #65, #66, #67 (D27).
Prover
Passed (Sonnet): At
a9694a4, mix precommit passes (1038 tests) and the recursive ignore query is cycle-safe and used in both list and status counts. Untested: browser after F5, API ignored flag for effects, performance on large tables.Every command above was run by Fortysix's Basecamp itself, on the branch named.
Effects show collapsed under their root on the dashboard and in history ("+ N affected"). A root's report page lists what it affects, an effect's says what caused it, and reports that opened within a minute without a link are shown as probably related. Settings → Dependencies adds links between sources with the item picker, and lists suggested links to confirm or dismiss: Find suggestions matches hosts across sources, and a diagnosis can suggest links with "Link: report X depends on report Y" lines, which are kept out of its text.Screenshots at
89f2781(Chromium, 390px and 1280px; seed: pve2 offline with 4 guests, a Kuma check linked to guest 105, and an unlinked report that opened alongside).desktop-dashboard-collapsed

desktop-dashboard-open

390-dashboard-open

desktop-root-incident

390-root-incident

desktop-effect

390-effect

desktop-settings

390-settings

a9694a4641ae54f1032aRebased onto main
1d67708after #64 (relay agent) merged, now atae54f10. The only conflicts were where both added to the same list: the Settings tabs (Agents now sits after Sources), the settings routes, the server's supervision tree (silence sweeper added to server_children), and the API auth test's route check. No feature code changed.mix precommitpasses on every branch in the stack and CI is green.