Repository navigation
docs(relay): 2026-09 reconnect findings, checklist, roadmap, and Roll 2 plan - #18958
Conversation
…ap, and Roll 2 plan Operator record for the 2026-09-04 relay reconnect incident and the Roll 1 same-cap cell image roll (complete 2026-09-05, selector gen 148), plus the follow-up checklist, roadmap, and the Roll 2 implementation plan. Docs only; split out of #18565 so the record merges independently of the code.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
Four docs-only files recording the 2026-09-04 auth/relay outage and the Roll 1 cell roll, plus the Roll 2 close-out plan. Reviewed the full incident record (Findings 1–13 and the #19–#50 gate log), the per-item checklist, the ranked roadmap, and the Roll 2 plan. Cross-references between the four files resolve and roadmap item numbers match the checklist sections.
ℹ️ Nitpicks
- The PR body describes the findings doc as "findings 1–8", but it actually contains Findings 1–13. Consider updating the description so readers aren't surprised by the extra sections.
- The cell counts don't obviously reconcile across the record: the roadmap/checklist say "roll all 23 cells" and "22 of 23 cells still have it", the findings "Roll inputs" section says "20 serving cells on
5aedbca5" while listing 18 by name, and the final census enumerates 29 cells (19 general + 8 existing-only + 2 migration-only). A one-line definition of what "23 cells" counts (vs. the 29-cell census) would keep a future reader from tripping over the discrepancy.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| - [x] 4.3: ±10 % jitter on control lease renewal; unit test on the distribution; wire-compatible (server accepts early renewals already). | ||
|
|
||
| ### 4.1 Lock contention (partial: stablyai/orca #18722 merged; ships Roll 2) | ||
| - [x] Replace the global `FOR UPDATE` over `relay_cells` with per-cell row locks; counters delta-only. Remaining: `assignOnce` placement lock is still global (optimistic snapshot follow-up). with per-cell row locks or `pg_advisory_xact_lock(cell)`; counters delta-only. |
There was a problem hiding this comment.
Duplicated editing artifact: the trailing with per-cell row locks or \pg_advisory_xact_lock(cell)`; counters delta-only.repeats the fix description already at the start of the bullet and dangles after theassignOnce` note.
| - [x] Replace the global `FOR UPDATE` over `relay_cells` with per-cell row locks; counters delta-only. Remaining: `assignOnce` placement lock is still global (optimistic snapshot follow-up). with per-cell row locks or `pg_advisory_xact_lock(cell)`; counters delta-only. | |
| - [x] Replace the global `FOR UPDATE` over `relay_cells` with per-cell row locks; counters delta-only. Remaining: `assignOnce` placement lock is still global (optimistic snapshot follow-up). |
📝 WalkthroughWalkthroughAdded three relay documentation files. The roadmap lists post-outage hardening priorities and completed work. The Roll 2 plan defines staging, deployment, monitoring, rollback, follow-up, deferred items, and excluded work. The checklist tracks implementation status, uplift ranking, rollout lanes, user-visible disruption, and per-item execution steps. Merge Risk: 🟠 High · up to The new operational documentation is not ready to use: it conflicts on completed rollout state, Roll 2 scope, rollback images, pruner configuration, and monitoring. Following the current instructions could cause unnecessary production changes or an incorrect relay recovery. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the documentation scope and lists the included files, but it omits most required template sections, including What Changed, Why, Linked Issue in the required format, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. Resolution Complete the required template sections. Add What Changed, Why, and Testing details; provide the linked issue using the required format; mark Visual Proof as N/A with a reason because this is documentation-only; complete or mark applicable sections as N/A; and complete the checklist items.
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: c5e78474-ec06-4364-8d09-9f84aab85cf1
📒 Files selected for processing (4)
cloud/docs/relay-improvement-checklist-2026-09.mdcloud/docs/relay-improvement-roadmap-2026-09.mdcloud/docs/relay-reconnect-2026-09-findings.mdcloud/docs/relay-roll2-plan-2026-09.md
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| **Deployed to production** | ||
| - Auth instance cap 20 + dead-family audit fix (orca-cloud #474) as revision `orca-cloud-auth-00031-tox`. | ||
| - Dynamic NAT ports in both regions (stablyai/orca #18693). Zero drops and zero proxy dial errors since. | ||
| - Nine alert policies with log metrics: 4 auth (#475), 3 relay Cloud SQL/NAT (#18693), 1 cell process-exit (#18717), all on the relay Slack channel. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the alert-policy count.
The listed categories total eight policies: 4 auth + 3 relay Cloud SQL/NAT + 1 cell process-exit. Correct “Nine” or identify the missing policy. Exact counts are needed for incident coverage audits.
| - **Roll 2 (week 2–3):** proxy `--private-ip` (2.1) + relay pool `statement_timeout` (2.3) + lock-contention | ||
| fix (4.1), all in one image/template. Prerequisite: 2.1's peering and private IP exist first. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Remove private IP from Roll 2's hard dependency until owner approval.
These lines put the --private-ip change in Roll 2, make 2.1 a hard dependency, and say that both director and cells ride Roll 2. The Roll 2 plan defers the private-IP move and ships only flag support. Keep the flag unset for Roll 2 and document the private-IP rollout as a separate owner-approved change.
Also applies to: 96-97, 151-152
| - [x] 4.3: ±10 % jitter on control lease renewal; unit test on the distribution; wire-compatible (server accepts early renewals already). | ||
|
|
||
| ### 4.1 Lock contention (partial: stablyai/orca #18722 merged; ships Roll 2) | ||
| - [x] Replace the global `FOR UPDATE` over `relay_cells` with per-cell row locks; counters delta-only. Remaining: `assignOnce` placement lock is still global (optimistic snapshot follow-up). with per-cell row locks or `pg_advisory_xact_lock(cell)`; counters delta-only. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make the lock-fix status unambiguous.
This line marks the replacement complete, says that assignOnce remains global, and then appends a second alternative: “per-cell row locks or pg_advisory_xact_lock(cell).” State which lock strategy shipped and list assignOnce as the remaining follow-up in a separate sentence.
| - [ ] Director: honor requested region when the preferred region has headroom, else sticky. Behind the existing flag. | ||
| - [ ] Measure with `orca_relay_runtime_metrics` region counters before/after. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 3 'orca_relay_runtime_metrics|region.*label|label.*region' \
cloud --glob '*.tf' --glob '*.ts' --glob '*.md'Repository: stablyai/orca
Length of output: 14724
Restore a region-level metric before measuring item 4.2. The orca_relay_runtime_metrics definitions omit the region label, so the planned measurement cannot distinguish Asia from US. Add a compatible region-level metric or revise item 4.2 to use an available measurement.
|
|
||
| | # | Item | Why | How | Size | | ||
| |---|---|---|---|---| | ||
| | 1.1 | **Roll all 23 cells onto the current relay image** | Every cell still runs the image that exits the whole process on a Postgres connect timeout (Finding 6). The fixed image runs only on the director and c7. Any future DB stall repeats the 200-crashes-in-48h pattern. | `cloud-deploy-relay-production-same-cap` waves, gated by the 15-min monitor. Roll inputs and canary results are in the findings doc ("Roll inputs", "Canary blast radius"). | one afternoon | |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Synchronize the active status across the roadmap and checklist.
cloud/docs/relay-improvement-roadmap-2026-09.md#L12-L12: replace the pre-Roll 1 claim that all cells still need the old-image rollout.cloud/docs/relay-improvement-roadmap-2026-09.md#L67-L67: update the old-image census and retain only the documented exceptions.cloud/docs/relay-improvement-checklist-2026-09.md#L7-L9: update the status cutoff to include the September 5 completion records.cloud/docs/relay-improvement-checklist-2026-09.md#L33-L39: move completed Roll 1 and#478actions out of “Awaiting owner go.”
📍 Affects 2 files
cloud/docs/relay-improvement-roadmap-2026-09.md#L12-L12(this comment)cloud/docs/relay-improvement-roadmap-2026-09.md#L67-L67cloud/docs/relay-improvement-checklist-2026-09.md#L7-L9cloud/docs/relay-improvement-checklist-2026-09.md#L33-L39
| | # | Item | Why | How | Size | | ||
| |---|---|---|---|---| | ||
| | 1.1 | **Roll all 23 cells onto the current relay image** | Every cell still runs the image that exits the whole process on a Postgres connect timeout (Finding 6). The fixed image runs only on the director and c7. Any future DB stall repeats the 200-crashes-in-48h pattern. | `cloud-deploy-relay-production-same-cap` waves, gated by the 15-min monitor. Roll inputs and canary results are in the findings doc ("Roll inputs", "Canary blast radius"). | one afternoon | | ||
| | 1.2 | **Enable the refresh_tokens pruning job** (orca-cloud #476, merged, off) | `refresh_tokens` is 63 M rows / 26 GB and grows forever; its size is what turned a slow disk into a sign-out storm (Finding 13). | Build an auth image from main (the 21:04Z deploy already contains the entrypoint: `orca-cloud-auth-00031-tox`, digest `343a0915…`), set `auth_token_pruner_enabled = true` and the image digest in `infra/terraform-apps/environments/production.tfvars`, apply targeted. First run with a small `auth_token_pruner_max_deleted_rows`. Watch the run summary's `stopReason`, not the exit code. ~48 M rows drain in ~10 days at 200k/hour. | 1 hour + 10 days of watching | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n 'auth_token_pruner_(max_deleted_rows|max_rows_per_run)' \
--glob '*.tf' --glob '*.tfvars' --glob '*.ts' --glob '*.md'Repository: stablyai/orca
Length of output: 151
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions
Length of output: 42980
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- matching files ---'
git ls-files | rg '(^|/)(cloud/docs|.*(roadmap|roll.?2|checklist|pruner|refresh_tokens).*)'
printf '%s\n' '--- exact identifier occurrences ---'
git grep -n -E 'auth_token_pruner_(max_deleted_rows|max_rows_per_run)' -- ':!node_modules' || true
printf '%s\n' '--- roadmap context ---'
sed -n '1,25p' cloud/docs/relay-improvement-roadmap-2026-09.mdRepository: stablyai/orca
Length of output: 6659
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- cloud documentation files ---'
git ls-files cloud/docs | sort
printf '%s\n' '--- all pruner-related references in cloud docs ---'
rg -n -i 'pruner|refresh_tokens|max_deleted|max_rows_per_run' cloud/docs || trueRepository: stablyai/orca
Length of output: 7579
Update the roadmap to use the canonical pruner setting.
The checklist and Roll 2 plan use auth_token_pruner_max_rows_per_run, and the findings record that setting as applied. The roadmap still uses auth_token_pruner_max_deleted_rows and says the job is off. Update the identifier and deployment status to prevent operators from using stale instructions.
| -f predecessor-image-digest=<serving digest>`. Blue/green; prior revision stays as rollback. | ||
| Watch director `orca_relay_postgres_transaction_retry` per minute before and after. The director | ||
| goes first so the per-cell locks are live before any cell restart burst. | ||
| 4. Same-cap `verify` mode against c7 with target=<new>, rollback=`519f4914`. Read-only. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use c7's current image as the rollback value.
This step uses rollback=\519f4914`for c7, but the plan states that c7 serves85bf6799and later gives c7's rollback as85bf6799`. Use the c7-specific value here. Otherwise the verify or recovery path can target an image that is not c7's previous serving image.
Proposed correction
-4. Same-cap `verify` mode against c7 with target=<new>, rollback=`519f4914`. Read-only.
+4. Same-cap `verify` mode against c7 with target=<new>, rollback=`85bf6799`. Read-only.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 4. Same-cap `verify` mode against c7 with target=<new>, rollback=`519f4914`. Read-only. | |
| 4. Same-cap `verify` mode against c7 with target=<new>, rollback=`85bf6799`. Read-only. |
| Failure handling: a failed canary re-enters through `mode=rollback` with rollback-digest = desired | ||
| image (Roll 1 c27 pattern). A gate freeze on an Asia latency probe despite the 4 000 ms bar is a | ||
| stop-and-investigate, not a retry. Monitor-side freezes (freshness, continuity deadline) re-gate | ||
| after a 2 min back-off; the chain does this on its own. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 5 'rollback-digest|mode=rollback|canary-apply' \
--glob '*.yml' --glob '*.yaml' --glob '*.md'Repository: stablyai/orca
Length of output: 151
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- target document ---'
sed -n '1,150p' cloud/docs/relay-roll2-plan-2026-09.md
printf '%s\n' '--- repository references ---'
rg -n -C 6 'rollback-digest|mode=rollback|canary-apply|Roll 1|c27|519f4914|85bf6799' . \
--glob '!node_modules' --glob '!dist' --glob '!build'
printf '%s\n' '--- workflow and automation files ---'
git ls-files | rg '(^|/)(\.github/workflows|.*workflow.*|.*canary.*|.*relay.*|.*roll.*)' | head -200Repository: stablyai/orca
Length of output: 50370
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions
Length of output: 18141
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- plan lines 70-125 ---'
sed -n '70,125p' cloud/docs/relay-roll2-plan-2026-09.md
printf '%s\n' '--- exact rollback option references ---'
rg -n -C 4 'rollback-digest|rollbackDigest|mode[=:][[:space:]]*rollback|mode=rollback' \
cloud .github --glob '*.yml' --glob '*.yaml' --glob '*.mjs' --glob '*.md' --glob '*.json' \
| head -300
printf '%s\n' '--- candidate workflow files ---'
git ls-files cloud .github | rg 'relay|roll|workflow|admission|same-cap' | rg '\.(yml|yaml|mjs|md)$' | head -250Repository: stablyai/orca
Length of output: 50369
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- same-cap workflow inputs and rollback path ---'
sed -n '1,180p' .github/workflows/cloud-deploy-relay-production-same-cap.yml
sed -n '240,315p' .github/workflows/cloud-deploy-relay-production-same-cap.yml
printf '%s\n' '--- same-cap job rollback variables and apply command ---'
rg -n -C 8 'ROLLBACK|rollback|TARGET_DIGEST|target-image-digest|rollback-image-digest|selectedImage|--image|--rollback-image|mode' \
.github/workflows/cloud-deploy-relay-production-same-cap-job.yml \
cloud/dev/scripts/relay-production-same-cap-wave.mjs \
cloud/dev/scripts/validate-relay-capacity-plan.mjsRepository: stablyai/orca
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,180p' .github/workflows/cloud-deploy-relay-production-same-cap.yml
sed -n '240,315p' .github/workflows/cloud-deploy-relay-production-same-cap.yml
rg -n -C 8 'ROLLBACK|rollback|TARGET_DIGEST|target-image-digest|rollback-image-digest|selectedImage|--image|--rollback-image|mode' \
.github/workflows/cloud-deploy-relay-production-same-cap-job.yml \
cloud/dev/scripts/relay-production-same-cap-wave.mjs \
cloud/dev/scripts/validate-relay-capacity-plan.mjsRepository: stablyai/orca
Length of output: 50370
Distinguish pre-apply recovery from post-apply rollback. mode=rollback applies rollback-image-digest as DESIRED_IMAGE_DIGEST. Roll 1 c27 used 519f4914 because the canary failed before applying the target. If a Roll 2 canary already applied <new>, use the prior serving digest: 85bf6799 for c7 and 519f4914 for the other cells. Document the live-image condition instead of saying “desired image.”
…ap, and Roll 2 plan (stablyai#18958) Operator record for the 2026-09-04 relay reconnect incident and the Roll 1 same-cap cell image roll (complete 2026-09-05, selector gen 148), plus the follow-up checklist, roadmap, and the Roll 2 implementation plan. Docs only; split out of stablyai#18565 so the record merges independently of the code.

ELI5
The write-up of what went wrong with phone reconnects on 2026-09-04, what we changed, how the fleet-wide cell image roll went (done 2026-09-05), and the plan for the last roll. Documents only.
Contents
cloud/docs/relay-reconnect-2026-09-findings.md: findings 1–8, every gate and wave of Roll 1 with run IDs, root causes of each gate freeze, final image census (all serving cells on519f4914, c7 on85bf6799, selector gen 148).cloud/docs/relay-improvement-checklist-2026-09.md: per-item checklists; 1.1 fully ticked.cloud/docs/relay-improvement-roadmap-2026-09.md: ranked roadmap.cloud/docs/relay-roll2-plan-2026-09.md: Roll 2 (per-cell locks + statement timeout + accept abandonment + 6 h lease) and close-out plan; private IP deferred to an owner decision.Split out of #18565 so the record lands independently of the code review there.