You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(connector-wake): retry one canary object-probe miss before paging - #49956
The connector wake alerts check a test Durable Object every 5 minutes. Now and then one check is slow, so we get paged even though wakes are fine. After this change a failed check is tried once more 10 seconds later, and we're paged only if that try fails too.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$30
$\color{#cf222e}{\Huge{\mathbf{−}}}$2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$28
Prod
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$23
$\color{#cf222e}{\Huge{\mathbf{−}}}$5
$\color{#1a7f37}{\Huge{\mathbf{+}}}$18
What Changed
cloud/apps/connector-wake/src/alerts.ts: if the canary object probe (GET /__health/object) misses, the wake alerts Worker waits OBJECT_PROBE_RETRY_MS (10 s) and probes again in the same cron run. It posts FIRING object-probe only when both tries miss, and the message includes both results.
evaluate() takes an optional wait function so tests don't sleep.
The edge probe, the rules, and the relay edge's shared alerts-probe.ts are unchanged. The relay edge alerts are not affected.
Why
Production paged FIRING object-probe: object health check got 503, expected 200 at 13:25 and 13:55 UTC on 2026-11-26, and the probe answered 200 in under 150 ms right after both. Both times the signature was the same:
A 3 s timeout, not an error. The wake Worker's p99 wall time for that minute was 3,000,652 µs and 3,001,775 µs, which is OBJECT_HEALTH_TIMEOUT_MS. Every other minute was 0.3–0.5 s.
No Durable Object exception in either minute.
No retirement wave. 1006 closes and reconnects were at baseline.
Wakes were fine.wake:error was 0 and admin failures were 0, with 257–374 delivered per 5 min.
The probe is stateless. Production has no ALERT_STATE KV, so every failing run posts, and one slow canary call is enough to page.
I considered paging after 2 failed runs (10 min apart). That needs state that production doesn't have, and it would delay a real page by 5 minutes. A retry inside the run needs no state and adds only 10 s to a real page: a broken object runtime fails both tries and still pages in the same run.
Linked Issue
N/A: maintainer change that follows production alert noise.
Visual Proof
N/A: alerts Worker only, with no UI or client behavior change.
Testing
vitest run in cloud/apps/connector-wake: 37 passed.
tsc --noEmit in cloud/apps/connector-wake: clean.
Added retries one canary miss after 10 s and stays quiet when the retry answers, and updated the canary-failure test to expect the retried message. Both fail on main's alerts.ts.
pnpm run check:code-quality:changed ran, but it skips cloud/ by design (ROOT_CODE_QUALITY_IGNORED_PREFIXES), so it checked nothing here.
Performance
This runs only in the wake alerts cron Worker, every 5 min, never on the wake path or in the desktop app.
Probe passes (the normal case): no change, one request.
Probe misses: one more GET /__health/object and a 10 s wait. The worst case is about 20 s with two 5 s probe timeouts, well within a cron Worker's limits. The extra request reaches one canary object, which is rate-limited by PREAUTH_LIMITER and touches no storage.
Deploy
The alerts Worker deploys from the orca revision in orca-cloud's cloud/connector-wake-source-revision. After this merges, a pin bump in orca-cloud is needed. That bump also becomes the source for the wake Worker's next deploy.
No actionable comments were generated in the recent review.
Walkthrough
The canary object probe now retries once after a failed check, with a 10-second delay. It reports an alert only if the retry also fails. The alert includes errors from both attempts. The wait callback is injectable through evaluate. The unauthenticated upgrade probe remains unchanged.
Merge Risk: Minimal · up to 4faea
The change makes the canary probe retry once after 10 seconds, which should reduce false pages from slow probes. A real outage is paged only 10 seconds later. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the connector-wake canary object probe now retries one miss before paging. The raw summary confirms a single retry after 10 seconds that reports an alert only when the…
Description check
The description follows the template closely. It has an ELI5 section, What Changed, Why, Linked Issue (marked N/A with a maintainer reason), Visual Proof (N/A with reason), Testing with checkboxes and…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the connector-wake canary object probe now retries one miss before paging. The raw summary confirms a single retry after 10 seconds that reports an alert only when the retry also fails. The title is specific, uses the fix() convention, and contains no vague terms. The title is 69 characters, within a typical length limit.
Full details: Description check
Explanation
The description follows the template closely. It has an ELI5 section, What Changed, Why, Linked Issue (marked N/A with a maintainer reason), Visual Proof (N/A with reason), Testing with checkboxes and commands, Performance with a concrete explanation, and a Deploy section. It is missing a Risk section with a Level value and a backout plan, and the Review, Agent skill upstream boundary, and AI Disclosure sections are absent. The Performance section also starts with 'None, because' only in the template sense; here it gives a full explanation, which is acceptable. Overall the description is mostly complete, so the check passes, but the Risk section should be added.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 56e2574b-2283-4ba9-89b0-4848238ad33e
Commits
Reviewing files that changed from the base of the PR and between a7a02c1 and 4faeadf.
Files selected for processing: 2
cloud/apps/connector-wake/src/alerts.ts
cloud/apps/connector-wake/test/alerts.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
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
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.
ELI5
The connector wake alerts check a test Durable Object every 5 minutes. Now and then one check is slow, so we get paged even though wakes are fine. After this change a failed check is tried once more 10 seconds later, and we're paged only if that try fails too.
What Changed
cloud/apps/connector-wake/src/alerts.ts: if the canary object probe (GET /__health/object) misses, the wake alerts Worker waitsOBJECT_PROBE_RETRY_MS(10 s) and probes again in the same cron run. It postsFIRING object-probeonly when both tries miss, and the message includes both results.evaluate()takes an optionalwaitfunction so tests don't sleep.alerts-probe.tsare unchanged. The relay edge alerts are not affected.Why
Production paged
FIRING object-probe: object health check got 503, expected 200at 13:25 and 13:55 UTC on 2026-11-26, and the probe answered 200 in under 150 ms right after both. Both times the signature was the same:OBJECT_HEALTH_TIMEOUT_MS. Every other minute was 0.3–0.5 s.wake:errorwas 0 and admin failures were 0, with 257–374 delivered per 5 min.The probe is stateless. Production has no
ALERT_STATEKV, so every failing run posts, and one slow canary call is enough to page.I considered paging after 2 failed runs (10 min apart). That needs state that production doesn't have, and it would delay a real page by 5 minutes. A retry inside the run needs no state and adds only 10 s to a real page: a broken object runtime fails both tries and still pages in the same run.
Linked Issue
N/A: maintainer change that follows production alert noise.
Visual Proof
N/A: alerts Worker only, with no UI or client behavior change.
Testing
vitest runincloud/apps/connector-wake: 37 passed.tsc --noEmitincloud/apps/connector-wake: clean.retries one canary miss after 10 s and stays quiet when the retry answers, and updated the canary-failure test to expect the retried message. Both fail onmain'salerts.ts.pnpm run check:code-quality:changedran, but it skipscloud/by design (ROOT_CODE_QUALITY_IGNORED_PREFIXES), so it checked nothing here.Performance
This runs only in the wake alerts cron Worker, every 5 min, never on the wake path or in the desktop app.
GET /__health/objectand a 10 s wait. The worst case is about 20 s with two 5 s probe timeouts, well within a cron Worker's limits. The extra request reaches one canary object, which is rate-limited byPREAUTH_LIMITERand touches no storage.Deploy
The alerts Worker deploys from the orca revision in orca-cloud's
cloud/connector-wake-source-revision. After this merges, a pin bump in orca-cloud is needed. That bump also becomes the source for the wake Worker's next deploy.