Repository navigation
chore(ci): fix flaky live-updates E2E test (heartbeat check thundering-herd) - #106
Merged
Merged
Conversation
#fast
fclairamb
added a commit
that referenced
this pull request
Nov 23, 2026
…on diagnostics (#990) ## What changed - **Checks search** (solidping-business#105): every word of a multi-word query must now match the name or the slug (`ts- ssh` finds `ts-ssh-…`); `%` and `_` typed in a search are matched literally. - **Escalation policy editor** (#107, finding 1): the step target Select stays controlled, no more React "uncontrolled to controlled" warning. - **Webhook deliveries** (#106): the HTTP status is classified. 4xx (and 3xx) are permanent failures, logged at WARN instead of ERROR; 5xx, 429 and 408 are retried up to `MaxRetryCount`, honouring `Retry-After` (seconds or date, capped at 15 min). The `Job failed` log line carries `status_code`. A notification webhook keeps the same `webhook-id` (the root job UID) across its retries, so receivers can deduplicate. - **iOS Safari session loss** (#107, finding 2): not reproduced under Playwright WebKit iPhone emulation, so only diagnostics ship: PostHog events `session_missing_on_load` (booleans only, never token values), `session_cleared` (with the reason, plus a `solidping_session_cleared` localStorage marker read on the next load) and `session_persist_failed`; events fired before PostHog loads are queued (max 10). The fix comes once production events point at the cause. Breaking (internal): `jobsvc.Service.RetryJob` takes an `after time.Duration`; `clearToken(reason)` now requires a reason. ## Decided by autopilot - webhook-status-retry-classification, "same `webhook-id` across retries?": yes, the root job UID. - webhook-status-retry-classification, "surface repeated failures as integration health?": out of scope. - ios-safari-session-lost, "ship the instrumentation first if not reproduced?": yes, instrumentation only. - ios-safari-session-lost, "drop stackless `Script error.` events?": not yet, only once the events show they don't precede the sign-out. Closes fclairamb/solidping-business#105 Closes fclairamb/solidping-business#106 Closes fclairamb/solidping-business#107 🤖 Generated with [Claude Code](https://claude.com/claude-code) - CodeQL js/clear-text-storage-of-sensitive-data, web/dash0/src/api/client.ts:126/131/135 (alerts #136-#138): dismissed as false positive, tokens live in localStorage by design until the HttpOnly-cookie spec (2026-09-15-05 B1), as for #1-#3/#129. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
live-updates.spec.tsE2E test (a new check's first result appears live on the detail page without the hot poll), which failed 3/3 attempts in CI run 28757925762.executeJobdispatched passive (heartbeat/email) checks toexecutePassiveJobbefore the pre-schedule sleep that active checks already honor. A passive job claimed ahead of itsscheduled_at(D3's bounded claim-ahead window) therefore fired immediately on every release instead of waiting out the window — thundering-herding the whole worker pool (reproduced locally: ~1000 executions of a single check in ~5s) and broadcasting a live-update hint on every one of those spurious executions, which is what the E2E test's fetch-count assertion was catching.scheduled_atstep inexecuteJobso it runs for both active and passive jobs, before dispatching to either path. Pure reorder of existing code — no behavior change for active checks, and passive checks now correctly wait out the claim-ahead window like every other check type.TestExecuteJobPassiveJobHonorsScheduledAtSleep) that fails on the old code and passes with the fix.Test plan
go build ./...andgo vet ./...cleanmake lintclean (backend + dash)make test— full backend suite passeslive-updates.spec.ts"without the hot poll" test run 15x in a row against a side-car server — 0 failures (was failing ~1/10-15 runs before the fix)live-updates.spec.tsfile run 3x — 0 failures🤖 Generated with Claude Code