Skip to content

fix(connector-wake): retry one canary object-probe miss before paging - #49956

Merged
Jinwoo-H merged 1 commit into
mainfrom
jinwoo/wake-object-probe-retry
Nov 26, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
jinwoo/wake-object-probe-retry

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

@Jinwoo-H
Jinwoo-H marked this pull request as ready for review November 26, 2026 14:05
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

@Jinwoo-H
Jinwoo-H merged commit 8dda369 into main Nov 26, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant