Skip to content

feat: incident insights page and uptime report insights - #862

Merged
fclairamb merged 41 commits into
mainfrom
feat/todos-2026-11-13
Nov 15, 2026
Merged

fclairamb merged 41 commits into
mainfrom
feat/todos-2026-11-13

Conversation

@fclairamb

@fclairamb fclairamb commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Incident insights page (/incidents/insights, GET /orgs/:org/incidents/insights): top failing checks, median/p90 time to acknowledge and to resolve, resolution split, 7d/30d/90d period; "Insights" button on the incidents list; en/fr/de/es; docs and e2e.
  • Scheduled uptime report: median time to resolve/acknowledge and a "Most incidents" block, computed by the same package as the dashboard; localized, preview fixtures and size budget updated.
  • Incidents active during the period: the page and the report insights now count an outage that started before the period and is still open, or was resolved inside it. Before, a check down for 10 days was missing from the 7 day table. New optional ListIncidentsFilter.ActiveSince (SQLite and Postgres). The report's existing downtime and incident-count figures are unchanged.
  • The insights endpoint returns exactly 5,000 incidents when truncated (it could return up to one page more).
  • More tests: window overlap, pagination and truncation, check lookup error, a group incident shared by two checks counted once in the report, a failed insights load failing the report, the page against the real endpoint (no mock).
  • Batch gate fix: the Insights button's data-testid was overridden by its inner link.
  • Flaky test fix: account-notifications-discord.spec.ts failed at teardown when the stubbed /auth/me fetch was still in flight.
  • CI fix: the upgrade test followed the newest raw result, which could belong to a disabled seed fixture the scheduler never runs again (random failure of one upgrade leg); it now follows an enabled check.

Decided by autopilot

  • Spec 01: downtime clipped in the new incidentinsights package instead of reusing availability.IncidentBlock (which drops incidents starting before the window); extra pagedCount field as the ack-rate base. No CHANGELOG edit (release-please owns it).

🤖 Generated with Claude Code

fclairamb and others added 2 commits November 13, 2026 00:40
@fclairamb
fclairamb marked this pull request as ready for review November 12, 2026 23:41
@fclairamb fclairamb added autopilot frozen Batch PR under review: takes only its own fixes, new work goes to the next batch labels Nov 12, 2026
fclairamb and others added 7 commits November 13, 2026 00:44
No CHANGELOG edit: release-please owns it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…cks, time to acknowledge, time to resolve

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…port

Reuses incidentinsights.Compute on the report window's incidents, restricted to the schedule's checks. CHANGELOG is release-please's.
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.57939% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.70%. Comparing base (5448aee) to head (c0fd6e5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/handlers/statuspages/service.go 9.52% 19 Missing ⚠️
server/internal/checkers/checksftp/checker.go 52.17% 11 Missing ⚠️
server/internal/incidentinsights/insights.go 93.61% 6 Missing ⚠️
server/internal/handlers/incidents/insights.go 97.56% 2 Missing ⚠️
server/internal/uptimereport/report.go 96.72% 2 Missing ⚠️
server/internal/checkers/checkbrowser/checker.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main     #862    +/-   ##
========================================
  Coverage   90.69%   90.70%            
========================================
  Files        1362     1365     +3     
  Lines      140172   140467   +295     
========================================
+ Hits       127135   127410   +275     
- Misses      13028    13048    +20     
  Partials        9        9            
Files with missing lines Coverage Δ
server/internal/app/server.go 92.11% <100.00%> (+<0.01%) ⬆️
server/internal/db/models/incident.go 100.00% <ø> (ø)
server/internal/db/postgres/postgres.go 94.93% <100.00%> (-0.08%) ⬇️
server/internal/db/sqlite/sqlite.go 96.80% <100.00%> (+<0.01%) ⬆️
...rver/internal/handlers/checks/placement_replace.go 88.75% <100.00%> (+0.59%) ⬆️
.../internal/handlers/emailpreview/fixtures_report.go 99.33% <100.00%> (+0.12%) ⬆️
server/internal/handlers/incidents/service.go 87.83% <ø> (-0.22%) ⬇️
...rver/internal/handlers/statuspages/load_failure.go 100.00% <100.00%> (ø)
server/internal/uptimereport/write.go 97.65% <100.00%> (+0.15%) ⬆️
server/internal/checkers/checkbrowser/checker.go 61.53% <92.85%> (+1.84%) ⬆️
... and 5 more

... and 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…tch gate)

Button asChild merges its props into the Link, whose own data-testid won,
so incidents-insights-button never existed in the DOM.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@fclairamb fclairamb added the implemented Every spec of the PR is implemented and its batch gate was green label Nov 13, 2026
@fclairamb fclairamb changed the title feat: todos 2026-11-13 feat: incident insights page and uptime report insights Nov 13, 2026
fclairamb and others added 9 commits November 13, 2026 01:43
… gate)

The Discord notifications negative-control test ends while the stubbed
route.fetch() is pending, so the disposed response failed the test on its
first attempt and passed on retry.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ing the period

Adds ListIncidentsFilter.ActiveSince (resolved_at IS NULL OR resolved_at >= value),
used with Until by the insights page and the report's insights figures, so an
outage that began before the window and is still open (or resolved inside it) is
counted. The report's downtime and incident-count figures are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Stacked on #862: merge it first.

Editing an email check dropped its config from the save request, so the
sender authentication options (SPF, DKIM, DMARC, blocklists) were never
saved. Email checks now send their config; heartbeat and
private-location are unchanged. Browser e2e test added.

Closes fclairamb/solidping-business#73

## Decided by autopilot
None.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
fclairamb and others added 3 commits November 13, 2026 08:57
…llows i18n (#866)

Stacked on #862: merge it first.

Closes fclairamb/solidping-business#74
Closes fclairamb/solidping-business#75

- sftp checker: close connection when context expires; context errors
map to timeout
- browser checker: detached page logged as INFO with clear diagnostics
- dashboard: `<html lang>` follows displayed language (fixes browser
auto-translate crash)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
fclairamb and others added 15 commits November 13, 2026 09:46
A release tag enters the upgrade matrix the moment it is pushed, but its
image is published by the tag's own CI about 20 minutes later. A pull
request whose CI started in between failed every leg from that tag on
'not found' (both v0.49.1 legs on this branch).

upgrade-test.sh now pulls the old image first and retries for IMAGE_WAIT
seconds (default 0, so a local run still fails at once). CI sets 1500 and
the job timeout goes from 10 to 35 minutes to leave room for it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Conflicts in the email check edit fix: this branch carried the fix from
PR 864 and main got the same fix in PR 868, with one more server test, a
DMARC assertion and the turn-off path in the Playwright test.

- check-form.tsx: the code change was identical on both sides, main's
  comment kept.
- email-check-sender-auth.spec.ts: main's test kept, it covers everything
  the branch's test asserted.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
# Conflicts:
#	web/dash0/e2e/email-check-sender-auth.spec.ts
#	web/dash0/src/components/shared/check-form.tsx
The snapshot took the newest raw result, which can belong to a disabled seed
fixture (validating check ...030) that the old release probes once at boot and
the scheduler never runs again, so the leg failed at random.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The "scheduler writes new results" step watched the check that owned the
newest raw result of the old version. Every fixture check is seeded with a
"created" row. When no check finished during the 30 s warmup, the newest
row was the one of the disabled validating-check fixture, which never gets
another result, so the leg failed after 180 s ("Upgrade sqlite from
v0.49.1" on 690b18d).

The snapshot now keeps the newest raw result of an enabled check.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…nsights-port

The same upgrade-test fix landed on the branch as 976991a while this one
was being verified. Its version of scripts/upgrade-test.sh is kept. Only the
wiki line survives from f1ee4eb.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
fclairamb and others added 2 commits November 14, 2026 16:33
…le (#877)

Stacked on #862: merge it first.

## Summary
- **Status page logs:** a visitor leaving a public status page mid-load
no longer logs every best-effort loader as an ERROR (`context.Canceled`
on a cancelled request is ignored; timeouts and real DB failures still
log).
- **Dark-region placement logs:** `ReplaceAutoChecks` logs one line per
pass and region with a `stuck` count, instead of one line per stuck
check on every pass.
- **Checks list on mobile:** the icon-only header buttons are square
below `sm`, so the "…" menu stays at the end of the row (e2e test at
361×654).

Closes fclairamb/solidping-business#77
Closes fclairamb/solidping-business#78

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@fclairamb
fclairamb merged commit e0f9b6a into main Nov 15, 2026
39 checks passed
@fclairamb
fclairamb deleted the feat/todos-2026-11-13 branch November 15, 2026 09:14
fclairamb added a commit that referenced this pull request Nov 15, 2026
…, phone checks menu (#879)

Stacked on #862: merge it first.

## What changed

- **A restarted worker frees its leased check jobs right away** instead
of leaving them locked for a full period plus 30 s. New
`ReleaseWorkerLeases` clears the lease of every job the worker claimed
before it (re)registered; schedule, run requests and step state are
kept, a claimed capture goes back to pending.
- In-process workers release at registration, before the fetcher starts.
- Agents send a per-process boot ID (enroll frame `bootId`, reconnect
header `X-Sp-Agent-Boot-Id`); the server stores it in the new
`workers.boot_id` column (migration `036_v0_49_4`) and releases only
when it changes, so a network reconnect keeps its running checks. Older
agents send none: unchanged behaviour.
- `lease_starts` is kept (not reset), so the dashboard's crash-loop
counter still sees a check that keeps killing its worker.
- Runbook note in `wiki/runbooks/operations-gotchas.md`; agents protocol
docs updated.
- Status page: a visitor leaving mid-load no longer logs
`context.Canceled` as ERROR/WARN (fclairamb/solidping-business#77).
- dash0: the checks list "…" menu stays at the end of its row on a phone
(fclairamb/solidping-business#78).

## Decided by autopilot

- Orphaned leases spec, "how does the server tell an agent restart from
a network reconnect?": a random boot ID per agent process, stored per
worker in a new nullable column, release only when it changes; no boot
ID, no release. (autopilot: recommended answer)

Closes fclairamb/solidping-business#77
Closes fclairamb/solidping-business#78

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
fclairamb added a commit that referenced this pull request Nov 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.50.0](v0.49.3...v0.50.0)
(2026-11-15)


### Features

* incident insights page and uptime report insights
([#862](#862))
([e0f9b6a](e0f9b6a))


### Bug Fixes

* batch-gate fixes for check worker wake-up, disable toggle, ui-state
order and E2E races
([#885](#885))
([829f43b](829f43b))
* **deps:** update module github.com/slack-go/slack to v0.36.0
([#878](#878))
([a50d878](a50d878))
* free a restarted worker's check leases, quieter status page logs,
phone checks menu
([#879](#879))
([5543a4c](5543a4c))
* **security:** redirect header policy, deleted-org email checks, tokens
out of the session replay
([#880](#880))
([cc8d0a5](cc8d0a5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge autopilot frozen Batch PR under review: takes only its own fixes, new work goes to the next batch implemented Every spec of the PR is implemented and its batch gate was green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant