Skip to content

fix: free a restarted worker's check leases, quieter status page logs, phone checks menu - #879

Merged
fclairamb merged 56 commits into
mainfrom
feat/todos-2026-11-14
Nov 15, 2026
Merged

fclairamb merged 56 commits into
mainfrom
feat/todos-2026-11-14

Conversation

@fclairamb

@fclairamb fclairamb commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

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

fclairamb and others added 30 commits November 13, 2026 00:40
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
…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]>
… 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]>
…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]>
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
@fclairamb fclairamb added frozen Batch PR under review: takes only its own fixes, new work goes to the next batch autopilot labels Nov 14, 2026
fclairamb and others added 6 commits November 14, 2026 23:35
Adds checkjobsvc.ReleaseWorkerLeases, which frees the check-job leases a
previous process of a worker left behind (claimed before a cutoff), and
ReleaseLeasesOnNewBoot, which records an agent's per-process boot ID on
its workers row (new column workers.boot_id, migration 036) and releases
only when that ID changes.

Spec 2026-11-14-03.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A worker that crashed or whose node rebooted came back under the same
worker UID but left the jobs it had leased locked until lease_expires_at,
up to a whole period (31 minutes of dark-region alerts on every node
upgrade).

- In-process workers free, right after registering, the leases their UID
  took before the process started.
- Deported agents send a random boot ID per process (enroll frame bootId,
  reconnect header X-Sp-Agent-Boot-Id). The server frees the agent's
  leases only when it changes, so a network reconnect keeps its in-flight
  runs. Older agents send none and keep the old behaviour.

Spec 2026-11-14-03.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eck jobs locked for a full period

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ck jobs locked for a full period

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@fclairamb fclairamb changed the title feat: todos 2026-11-14 fix: free a restarted worker's check leases, quieter status page logs, phone checks menu Nov 14, 2026
@fclairamb fclairamb added the implemented Every spec of the PR is implemented and its batch gate was green label Nov 14, 2026
Base automatically changed from feat/todos-2026-11-13 to main November 15, 2026 09:13
@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.38318% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.72%. Comparing base (a50d878) to head (38dc59d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/app/sms_probing_wiring.go 6.66% 14 Missing ⚠️
server/internal/checkworker/checkjobsvc/service.go 87.50% 6 Missing ⚠️
server/internal/handlers/agentws/handler.go 78.57% 3 Missing ⚠️
server/internal/checkworker/backend/ws.go 75.00% 1 Missing ⚠️
server/internal/checkworker/worker.go 85.71% 1 Missing ⚠️
server/internal/entitlements/sms_probing.go 98.27% 1 Missing ⚠️
server/internal/handlers/auth/service.go 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main     #879    +/-   ##
========================================
  Coverage   90.71%   90.72%            
========================================
  Files        1368     1370     +2     
  Lines      140620   140830   +210     
========================================
+ Hits       127566   127763   +197     
- Misses      13045    13058    +13     
  Partials        9        9            
Files with missing lines Coverage Δ
server/internal/agents/protocol.go 100.00% <ø> (ø)
server/internal/app/server.go 92.12% <100.00%> (+<0.01%) ⬆️
server/internal/checkworker/backend/direct.go 88.66% <100.00%> (+2.76%) ⬆️
server/internal/db/models/worker.go 100.00% <ø> (ø)
server/internal/entitlements/instance_sms_guard.go 97.53% <100.00%> (+0.03%) ⬆️
server/internal/entitlements/service.go 93.28% <ø> (ø)
...ernal/handlers/usernotifications/resend_limiter.go 100.00% <100.00%> (ø)
...rver/internal/handlers/usernotifications/verify.go 91.11% <100.00%> (+0.86%) ⬆️
...rver/internal/jobs/jobtypes/job_operator_notice.go 90.41% <100.00%> (+0.27%) ⬆️
server/internal/opsnotify/copy.go 100.00% <100.00%> (ø)
... and 8 more

... and 18 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 and others added 4 commits November 15, 2026 10:37
…883)

Stacked on #879: merge it first.

Closes fclairamb/solidping-business#79
Closes fclairamb/solidping-business#81

## Still pending
-
specs/todos/2026-11-15-01-sms-verification-destination-probing-throttle.md
- specs/todos/2026-11-15-02-org-slug-rename-logs-user-out.md

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@fclairamb
fclairamb merged commit 5543a4c into main Nov 15, 2026
38 checks passed
@fclairamb
fclairamb deleted the feat/todos-2026-11-14 branch November 15, 2026 10:39
fclairamb added a commit that referenced this pull request Nov 15, 2026
…ate order and E2E races (#885)

Batch-gate fixes found after #883 (SMS destination probing throttle, org
slug rename session) had already been merged to main through #879. Both
specs are on main; these commits are not.

## What changed
- **Check worker:** a runner wakes the fetcher the first time it becomes
available, so a job freed by a worker restart is claimed at once instead
of after the one-minute fallback poll (fixes the flaky
`TestRestartedWorkerReclaimsItsOwnLeases`).
- **Check detail:** the Disable toggle stays disabled until the
open-incident count has loaded; before, a quick click disabled the check
with no dialog and left its incident open. New E2E in
`check-disable-resolve-incidents.spec.ts`.
- **ui-state:** writes to one key now run in call order, so the GitHub
star prompt's "shown" write can no longer erase "dismissed" (the prompt
came back on other devices). New unit test.
- **Organization profile:** after "Use an external URL instead", a late
`/auth/me` refresh no longer switches the logo field back to "Uploaded
file". New unit test.
- **E2E races fixed** (assertions unchanged): availability-strip tooltip
hover (page scrolled under the hover and Radix closed the tooltip),
chart-dot clicks before the header settled, the rename test's forced 401
now on `GET /auth/me` only.

## Gate
`make lint-back test` exit 0 (284 packages, 0 lint issues); dash0
`typecheck:e2e`, `lint:e2e`, `test:unit` (2925) exit 0; full Playwright
suite 1037/0/15, 0 flaky.

🤖 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