feat(silences): maintenance windows for sources, items and reports (#56) #67

Merged
jfro merged 3 commits from feat/56-silences into main 2026-11-14 14:58:55 +00:00
Owner

What changed

PR #67 @0c7eab5 fixes F3, passes my gap test and the full suite (1006), and passes the 390px + desktop Chromium silences check again (C35, C37), with nothing else blocking in my code audit.

Fixes #56

Red, then green

  • Silences: coverage (whole source, items and nested keys, scheduled, overlapping), no notifications or auto diagnosis while active, one "still open after maintenance" notification when one ends, Settings → Silences, the report Silence menu, the dashboard banner, local-time parsing, and the API/MCP are covered by tests that fail without #56 and pass on the branch.: export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset FORGEJO_TOKEN FORGEJO_URL && export MIX_TEST_PARTITION=_56 && mix test test/lamplighter/silences_test.exs test/lamplighter_web/silence_time_test.exs test/lamplighter_web/live/silence_live_test.exs test/lamplighter_web/api/silences_test.exs
    • fails on the base (b827a40): exit 1
    • passes on the branch (2cd1f10): exit 0

Checks

  • mix precommit passes on feat/56-silences (compile with warnings as errors, format, full suite of 1004 tests). (Upper Wolfjaw): export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset FORGEJO_TOKEN FORGEJO_URL && export MIX_TEST_PARTITION=_56 && mix precommit, exit 0
  • In real Chromium at 390px and 1280px, silencing from a report, the dashboard banner and badge, and Settings → Silences (items by search, scheduled start in local time, End now, Cancel) all work without overflow. (Upper Wolfjaw): cd /home/peak/work/lamplighter-v1-2 && curl -s --noproxy '*' -o /dev/null localhost:4129/users/log-in && timeout 170 ~/.venvs/pw/bin/python checks/silences_browser.py 4 | tail -1 | grep -qx ok, exit 0
  • At 2cd1f10, the branch's silence, API and LiveView tests pass, and Upper Wolfjaw's real-Chromium silences_browser.py (390px + desktop: picker, whole source, schedule/Cancel, +1 hour, End now, report menu and pill, dashboard banner and badge) passes against my own dev server on :4129. (Nye): cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse --short HEAD)" = 2cd1f10 && source ../env.sh && unset $(env | grep -oE '^(FORGEJO|GITHUB_ISSUES)[A-Z_]*'); MIX_ENV=test mix test test/lamplighter/silences_test.exs test/lamplighter_web/api/silences_test.exs test/lamplighter_web/live/silence_live_test.exs test/lamplighter_web/silence_time_test.exs test/lamplighter_web/api/auth_test.exs && RID=$(psql -qtA postgresql://postgres:postgres@localhost/lamplighter_dev -c "select id from reports where fingerprint='15:guest:101' order by id desc limit 1") && python3 ../review56/silences_browser.py $RID | tail -1 | grep -qx ok, exit 0
  • On PR #67 @0c7eab5, the full suite passes with my F3 gap test added (1006 tests), and the 390px + desktop Chromium silences script still passes against my dev server. (Nye): cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse HEAD)" = 0c7eab59282bf11329d1c7c77f21bdfb3983056c && source ../env.sh && mix test test/lamplighter/nye_silence_gap_test.exs test/lamplighter/silences_test.exs test/lamplighter_web 2>&1 | tail -3 | grep -E '[0-9]+ passed' && ! mix test 2>&1 | tail -2 | grep -q failure && cd ../review56 && python3 silences_browser.py 14 | tail -1 | grep -qx ok, exit 0
  • At 0c7eab5 I read the F3 fix (catch_up filters unchanged, so no double-send) and ran the full suite myself: 1006 pass; I found no regressions from dropping the starts_at bound. Untested by me: real-browser check, the End-now/sweeper race, merge order after #65/#66. (Prover): cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse HEAD)" = 0c7eab59282bf11329d1c7c77f21bdfb3983056c && source ../env.sh && unset $(env | grep -oE '^(FORGEJO|GITHUB_ISSUES)[A-Z_]*'); MIX_ENV=test mix test test/lamplighter/silences_test.exs test/lamplighter/nye_silence_gap_test.exs test/lamplighter_web 2>&1 | tail -3 | grep -E '[0-9]+ passed', exit 0

Found and fixed

  • F3 bug: A problem held back during a whole-source silence, then silenced again from its report page (a second silence made after the hold-back), never gets its "Still open after maintenance" notice: catch_up only counts notification_silenced events at or after the ending silence's own starts_at, so when the later silence ends it finds nothing and the problem stays quiet for good. (fixed)

Risks

#67 is stacked on #66, which is built on #57's pre-fix head, so it must merge after #65 and #66 (D22 order, merge commits). Rare race nit: End now at the same instant the sweeper ends a silence could send the still-open notice twice. Recurring windows, Alertmanager mirroring and a node-covers-guests checkbox are deferred (D18–D21, assumed).

Prover

Passed (Sonnet): At 0c7eab5 I read the F3 fix (catch_up filters unchanged, so no double-send) and ran the full suite myself: 1006 pass; I found no regressions from dropping the starts_at bound. Untested by me: real-browser check, the End-now/sweeper race, merge order after #65/#66.

Every command above was run by Fortysix's Basecamp itself, on the branch named.

## What changed PR #67 @0c7eab5 fixes F3, passes my gap test and the full suite (1006), and passes the 390px + desktop Chromium silences check again (C35, C37), with nothing else blocking in my code audit. Fixes #56 ## Red, then green - Silences: coverage (whole source, items and nested keys, scheduled, overlapping), no notifications or auto diagnosis while active, one "still open after maintenance" notification when one ends, Settings → Silences, the report Silence menu, the dashboard banner, local-time parsing, and the API/MCP are covered by tests that fail without #56 and pass on the branch.: `export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset FORGEJO_TOKEN FORGEJO_URL && export MIX_TEST_PARTITION=_56 && mix test test/lamplighter/silences_test.exs test/lamplighter_web/silence_time_test.exs test/lamplighter_web/live/silence_live_test.exs test/lamplighter_web/api/silences_test.exs` - fails on the base (b827a40): exit 1 - passes on the branch (2cd1f10): exit 0 ## Checks - mix precommit passes on feat/56-silences (compile with warnings as errors, format, full suite of 1004 tests). (Upper Wolfjaw): `export PATH=$HOME/.local/bin:$PATH && eval "$(mise activate bash --shims)" && unset FORGEJO_TOKEN FORGEJO_URL && export MIX_TEST_PARTITION=_56 && mix precommit`, exit 0 - In real Chromium at 390px and 1280px, silencing from a report, the dashboard banner and badge, and Settings → Silences (items by search, scheduled start in local time, End now, Cancel) all work without overflow. (Upper Wolfjaw): `cd /home/peak/work/lamplighter-v1-2 && curl -s --noproxy '*' -o /dev/null localhost:4129/users/log-in && timeout 170 ~/.venvs/pw/bin/python checks/silences_browser.py 4 | tail -1 | grep -qx ok`, exit 0 - At 2cd1f10, the branch's silence, API and LiveView tests pass, and Upper Wolfjaw's real-Chromium silences_browser.py (390px + desktop: picker, whole source, schedule/Cancel, +1 hour, End now, report menu and pill, dashboard banner and badge) passes against my own dev server on :4129. (Nye): `cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse --short HEAD)" = 2cd1f10 && source ../env.sh && unset $(env | grep -oE '^(FORGEJO|GITHUB_ISSUES)[A-Z_]*'); MIX_ENV=test mix test test/lamplighter/silences_test.exs test/lamplighter_web/api/silences_test.exs test/lamplighter_web/live/silence_live_test.exs test/lamplighter_web/silence_time_test.exs test/lamplighter_web/api/auth_test.exs && RID=$(psql -qtA postgresql://postgres:postgres@localhost/lamplighter_dev -c "select id from reports where fingerprint='15:guest:101' order by id desc limit 1") && python3 ../review56/silences_browser.py $RID | tail -1 | grep -qx ok`, exit 0 - On PR #67 @0c7eab5, the full suite passes with my F3 gap test added (1006 tests), and the 390px + desktop Chromium silences script still passes against my dev server. (Nye): `cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse HEAD)" = 0c7eab59282bf11329d1c7c77f21bdfb3983056c && source ../env.sh && mix test test/lamplighter/nye_silence_gap_test.exs test/lamplighter/silences_test.exs test/lamplighter_web 2>&1 | tail -3 | grep -E '[0-9]+ passed' && ! mix test 2>&1 | tail -2 | grep -q failure && cd ../review56 && python3 silences_browser.py 14 | tail -1 | grep -qx ok`, exit 0 - At 0c7eab5 I read the F3 fix (catch_up filters unchanged, so no double-send) and ran the full suite myself: 1006 pass; I found no regressions from dropping the starts_at bound. Untested by me: real-browser check, the End-now/sweeper race, merge order after #65/#66. (Prover): `cd /home/peak/work/lamplighter-v1-2/lamplighter-56 && test "$(git rev-parse HEAD)" = 0c7eab59282bf11329d1c7c77f21bdfb3983056c && source ../env.sh && unset $(env | grep -oE '^(FORGEJO|GITHUB_ISSUES)[A-Z_]*'); MIX_ENV=test mix test test/lamplighter/silences_test.exs test/lamplighter/nye_silence_gap_test.exs test/lamplighter_web 2>&1 | tail -3 | grep -E '[0-9]+ passed'`, exit 0 ## Found and fixed - F3 bug: A problem held back during a whole-source silence, then silenced again from its report page (a second silence made after the hold-back), never gets its "Still open after maintenance" notice: catch_up only counts notification_silenced events at or after the ending silence's own starts_at, so when the later silence ends it finds nothing and the problem stays quiet for good. (fixed) ## Risks #67 is stacked on #66, which is built on #57's pre-fix head, so it must merge after #65 and #66 (D22 order, merge commits). Rare race nit: End now at the same instant the sweeper ends a silence could send the still-open notice twice. Recurring windows, Alertmanager mirroring and a node-covers-guests checkbox are deferred (D18–D21, assumed). ## Prover Passed (Sonnet): At 0c7eab5 I read the F3 fix (catch_up filters unchanged, so no double-send) and ran the full suite myself: 1006 pass; I found no regressions from dropping the starts_at bound. Untested by me: real-browser check, the End-now/sweeper race, merge order after #65/#66. Every command above was run by Fortysix's Basecamp itself, on the branch named.
jfro added this to the v1.2 milestone 2026-11-14 02:00:27 +00:00
Adds report_events, filled where things happen: Triggers (opened,
escalated, de-escalated, recovering, flapped, resolved), Diagnosis
(queued, started, completed with its text, failed), Notifications (sent
or failed per channel) and people (acknowledged, ignored, notes).
Re-running a diagnosis keeps the earlier ones on the timeline.

People can acknowledge a report; a rise above the acknowledged severity
reopens it. Notes are Markdown, edited or deleted only by their author,
and go into the AI's context for diagnosis and chat. Existing reports get
opened, diagnosis and resolved events backfilled.

Refs #57
The report page gets a Timeline (each diagnosis kept, with its full
text), an Acknowledge button, and Notes that their authors can edit or
delete. The dashboard shows who acknowledged a report, and History can
filter to reports with notes.

Refs #57
feat(api): read a report's timeline and add notes over the API and MCP
All checks were successful
CI / test (pull_request) Successful in 1m15s
2c658e5f47
GET /api/v1/reports/:id/timeline and the get_report_timeline tool return
the events and notes. A new notes token scope allows
POST /api/v1/reports/:id/notes and the add_report_note tool, writing as
the token's user, so an AI agent can record what it found or did.

Closes #57
Lamplighter.Export builds the Markdown (facts, diagnosis, notes and
timeline for a report; each turn for a chat). Reports get Copy Markdown
and Download .md next to the diagnosis; an open chat gets an export menu.
Downloads come from ExportController, scoped to the user's own chats.

Refs #54
feat(trackers): create Forgejo and GitHub issues
Some checks failed
CI / test (pull_request) Failing after 1m6s
17e3911279
Lamplighter.Trackers keeps one config per kind (env wins over settings,
token in an EncryptedMap), tests the connection, and files an issue with
a title and body, with errors that say what to check and never the token.

Refs #54
feat(trackers): Issue trackers settings and a Create issue modal
All checks were successful
CI / test (pull_request) Successful in 1m19s
b827a40677
Settings → Issue trackers sets up Forgejo and GitHub (env wins, Test
checks the token). Reports and chats get Create issue: a modal with the
tracker, repository (last used, default, or a GitHub report's repo),
title, an optional comment and a preview of what's sent. A filed report
gets a note linking the issue. With no tracker, the button links to setup.

Fixes #54
Active silences hold back notifications and automatic diagnosis for the
problems they cover and leave them out of the dashboard's status; reports
still open and resolve. When a silence ends, what it held back and is still
open sends one "still open after maintenance" notification and is
diagnosed. Refs #56
feat(silences): Settings → Silences, Silence on reports, banner, API and MCP
All checks were successful
CI / test (pull_request) Successful in 1m17s
2cd1f1042e
Settings → Silences starts a silence for a source or items picked by
search (now or later, for 1h, 4h, until tomorrow 8:00 or a custom end) and
lists active, upcoming and recently ended ones with End now, Cancel and
+1 hour. A report's Silence menu silences its problem. Covered reports show
"Silenced until …" and the dashboard shows a banner. Times are read and
shown in the browser's time zone.

POST /api/v1/silences, GET /api/v1/silences and
POST /api/v1/silences/:id/end, with list_silences, create_silence and
end_silence MCP tools; writing needs the new silences token scope.
Refs #56
Author
Owner

Screenshots at 2cd1f10 (real Chromium, America/New_York, 390px and 1280px):

report-menu, 390

390 report-menu

report-menu, desktop

desktop report-menu

report-silenced, 390

390 report-silenced

report-silenced, desktop

desktop report-silenced

dashboard, 390

390 dashboard

dashboard, desktop

desktop dashboard

settings-form, 390

390 settings-form

settings-form, desktop

desktop settings-form

settings-lists, 390

390 settings-lists

settings-lists, desktop

desktop settings-lists

Screenshots at 2cd1f10 (real Chromium, America/New_York, 390px and 1280px): **report-menu, 390** ![390 report-menu](https://git.knope.dev/attachments/33dd85c9-1334-4923-85af-6b451ee62f00) **report-menu, desktop** ![desktop report-menu](https://git.knope.dev/attachments/dfe4f219-ed65-4b8d-9389-a919f3f6fd9d) **report-silenced, 390** ![390 report-silenced](https://git.knope.dev/attachments/544b5a4a-2ced-4789-934d-e8a8387362d2) **report-silenced, desktop** ![desktop report-silenced](https://git.knope.dev/attachments/a864e810-45d2-4583-884b-1dcc208dd720) **dashboard, 390** ![390 dashboard](https://git.knope.dev/attachments/8a19b17c-b237-4a0f-8a83-81d1cbd3e42b) **dashboard, desktop** ![desktop dashboard](https://git.knope.dev/attachments/2d42ef91-7936-431d-9f00-bfed9db2f36c) **settings-form, 390** ![390 settings-form](https://git.knope.dev/attachments/3865031f-af54-4541-9572-eb829ef636ee) **settings-form, desktop** ![desktop settings-form](https://git.knope.dev/attachments/21f5c9c7-9219-4208-a813-49a69d9ff841) **settings-lists, 390** ![390 settings-lists](https://git.knope.dev/attachments/49c817fe-1f64-4adf-8da6-c43e2bfe0d3f) **settings-lists, desktop** ![desktop settings-lists](https://git.knope.dev/attachments/983ae240-62a8-46ff-a18d-d9c606096897)
fix(silences): catch up hold-backs from before the ending silence began
All checks were successful
CI / test (pull_request) Successful in 1m30s
0c7eab5928
A problem held back by a whole-source silence and then silenced again from
its report never got its still-open notice: catch-up only counted hold-backs
at or after the ending silence's own start. Count every hold-back not yet
caught up instead.
jfro force-pushed feat/56-silences from 0c7eab5928
All checks were successful
CI / test (pull_request) Successful in 1m30s
to 4ae09f1a38
All checks were successful
CI / test (pull_request) Successful in 1m52s
2026-11-14 14:32:44 +00:00
Compare
Author
Owner

Rebased onto main 1d67708 after #64 (relay agent) merged, now at 4ae09f1. 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 precommit passes on every branch in the stack and CI is green.

Rebased onto main 1d67708 after #64 (relay agent) merged, now at 4ae09f1. 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 precommit` passes on every branch in the stack and CI is green.
jfro merged commit 79aa40b8b0 into main 2026-11-14 14:58:55 +00:00
jfro deleted branch feat/56-silences 2026-11-14 14:58:55 +00:00
Sign in to join this conversation.
No description provided.