Skip to content

feat(checks): offer to resolve open incidents when a check is disabled - #648

Merged
fclairamb merged 14 commits into
mainfrom
fix/issues-647
Oct 23, 2026
Merged

fclairamb merged 14 commits into
mainfrom
fix/issues-647

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Closes #647

Disabling a check by hand left its open incidents active forever, since no new results came in to resolve them. The dashboard now offers to resolve them, and the API has an opt-in flag.

What changed

  • PATCH on a check takes resolveOpenIncidents (default false). With enabled: false it resolves the check's open outage and degraded incidents. Without enabled: false it is a 400 VALIDATION_ERROR. Also available on the MCP update_check tool.
  • New resolution type check_disabled (no migration: resolution_type is free text). One incident.resolved event per incident, pending escalations cancelled, live update published.
  • Notifications on all channels and the email templates (en, fr, de, es) say the incident was closed because the check was disabled.
  • dash0: disabling a check that has active incidents opens a dialog with a "resolve open incidents" checkbox, checked by default. A check without open incidents disables in one click. Incident timeline shows the new reason.
  • Docs: OpenAPI, features/incidents.md, configuration/notifications.md.
  • Tests: Go (service and HTTP 400), Playwright (resolve and keep-open paths).
  • Not covered: /apply and import don't take the new field.

Batch gate: make build-backend lint-back test green, dash0 typecheck:e2e and lint:e2e green, full Playwright suite 974 passed / 0 failed / 15 skipped.

Decided by autopilot

  • specs/done/2026/10/2026-10-23-01-resolve-incidents-when-check-disabled.md, opt-in or automatic: opt-in on the API (default false), default-checked in the UI.
  • Same spec, which resolution type: new check_disabled, not the existing disabled (which means degraded detection turned off).

🤖 Generated with Claude Code

fclairamb and others added 7 commits October 23, 2026 11:25
Converted issue #647 to a spec: needs a new resolveOpenIncidents field on the
check PATCH and a product decision on opt-in vs automatic closing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PATCH accepts resolveOpenIncidents alongside enabled:false. Incidents close
with the new check_disabled resolution type; notifications, email, dash0 and
docs word it as disabled rather than recovered.

Closes #647

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…check is disabled manually

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rom an active-state query

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…check is disabled manually

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.67717% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.71%. Comparing base (077a0b7) to head (94583fc).

Files with missing lines Patch % Lines
...rver/internal/handlers/incidents/check_disabled.go 84.00% 8 Missing ⚠️
server/internal/notifications/slack.go 25.00% 6 Missing ⚠️
server/internal/notifications/twilio.go 33.33% 2 Missing ⚠️
...rver/internal/handlers/checks/disable_incidents.go 90.90% 1 Missing ⚠️
server/internal/handlers/checks/service.go 75.00% 1 Missing ⚠️
...al/jobs/jobtypes/job_incident_resolution_notice.go 50.00% 1 Missing ⚠️
server/internal/notifications/check_deleted.go 94.11% 1 Missing ⚠️
server/internal/notifications/discord.go 75.00% 1 Missing ⚠️
server/internal/notifications/msteamsbot.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #648      +/-   ##
==========================================
- Coverage   83.72%   83.71%   -0.01%     
==========================================
  Files        1269     1271       +2     
  Lines      129812   129918     +106     
==========================================
+ Hits       108682   108762      +80     
- Misses      21121    21147      +26     
  Partials        9        9              
Files with missing lines Coverage Δ
server/internal/app/server.go 81.97% <100.00%> (+<0.01%) ⬆️
server/internal/db/models/incident.go 100.00% <ø> (ø)
server/internal/handlers/checks/handler.go 80.56% <100.00%> (+0.03%) ⬆️
server/internal/mcp/handler.go 95.23% <100.00%> (+0.01%) ⬆️
server/internal/mcp/tools_checks.go 88.25% <100.00%> (+0.12%) ⬆️
server/internal/notifications/email.go 92.98% <100.00%> (+0.05%) ⬆️
server/internal/notifications/googlechat.go 77.23% <100.00%> (ø)
server/internal/notifications/gotify.go 89.10% <100.00%> (ø)
server/internal/notifications/matrix.go 87.66% <100.00%> (ø)
server/internal/notifications/mattermost.go 87.93% <100.00%> (ø)
... and 14 more

... and 12 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.

@fclairamb
fclairamb enabled auto-merge (squash) October 23, 2026 19:11
@fclairamb
fclairamb merged commit 9553cdc into main Oct 23, 2026
33 checks passed
@fclairamb
fclairamb deleted the fix/issues-647 branch October 23, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offer to resolve open incidents when a check is disabled manually

1 participant