Repository navigation
feat(relay): declare US cells c32 and c33 at the 3,000-host shape - #24444
Conversation
Declares two us-central1 cells at the Asia shape (cap 3000, 6000 request units, e2-standard-4) with the US default pool of 10, and generalises the Asia topology and admission ladder to derive each wave's region from its reviewed zone, leaving every Asia wave's behaviour unchanged. Claude-Session: ced32ebb-7155-4413-adad-1eccd14c2010
|
…st to promotion Claude-Session: ced32ebb-7155-4413-adad-1eccd14c2010
There was a problem hiding this comment.
Caution
Declaring both US cells in one commit breaks the topology workflow's live-images step. overlayRelayLiveCellImages refuses any declared non-target cell that has no instance template in state, so the C32 plan fails on C33 — and because the committed plan variables contain the whole tfvars map, every topology plan (Asia included) fails until both cells exist. The cells cannot be scaffolded by the ladder this PR documents.
Reviewed changes
- Declares
production-gce-c32/c33. Both added toproduction.tfvarsat the Asia 3,000-connection shape (us-central1-a/-b, pool 10, newest image) and torelay_region_rehome_source_cell_ids. - Topology region generalization. The topology workflow/validator/input take each wave's region from its reviewed zone: a
us-central1wave plans no additional-region network, and its template carries no region label/line and no pool line at the default. - Admission region generalization.
cellRegion()maps c32/c33 tous-central1; registration and the runtime check expect the cell's own region; the Asia launch-order promotion gates are gated byasiaWaveso US cells skip them; the canary region is threaded throughcanary_region/CANARY_REGION. - US canary evidence. The canary filters cell metrics by its own region, adds and gates
usSelections, and records but does not gate either region's fallbacks. - Static lists. C32/C33 added to the same-cap migration-only list, the rehome trust-probe allowlist, the SQL connection budget expectations, the director-cells pool table, and the load-profile preferred regions; docs updated.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughProduction configuration adds Relay cells C32 and C33 in Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to This change declares two disabled US relay cells and generalizes the rollout tooling to handle their region. No concrete merge-blocking issue was found, and the cells stay migration-only until they are promoted separately. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new cells use the existing fleet’s credential boundary and controlled rollout paths. Region-specific validation and recovery checks limit the identified risk, and no introduced exploitable security condition was demonstrated. The canary runs after general admission, not before all ordinary traffic. Deployed permissions and complete interruption recovery remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.93% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 20 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: dad9eea5-a0c6-4bc5-929b-1acfaf575135
📒 Files selected for processing (26)
.github/workflows/cloud-deploy-relay-asia-topology.yml.github/workflows/cloud-deploy-relay-production-same-cap-job.yml.github/workflows/cloud-operate-relay-asia-admission.ymlcloud/dev/scripts/operate-relay-asia-admission.mjscloud/dev/scripts/operate-relay-asia-admission.test.mjscloud/dev/scripts/prepare-relay-asia-director-cells.mjscloud/dev/scripts/prepare-relay-asia-director-cells.test.mjscloud/dev/scripts/prepare-relay-asia-topology-input.mjscloud/dev/scripts/prepare-relay-asia-topology-input.test.mjscloud/dev/scripts/prepare-relay-production-capacity-canary.test.mjscloud/dev/scripts/probe-relay-rehome-trust.mjscloud/dev/scripts/probe-relay-rehome-trust.test.mjscloud/dev/scripts/relay-asia-rollout-evidence.mjscloud/dev/scripts/relay-asia-rollout-evidence.test.mjscloud/dev/scripts/relay-asia-topology-workflow.test.mjscloud/dev/scripts/relay-cloud-sql-connection-budget.test.mjscloud/dev/scripts/relay-load-profile.mjscloud/dev/scripts/relay-load-profile.test.mjscloud/dev/scripts/relay-production-same-cap-wave.mjscloud/dev/scripts/relay-production-same-cap-wave.test.mjscloud/dev/scripts/relay-same-cap-script-census.test.mjscloud/dev/scripts/validate-relay-asia-topology-plan.mjscloud/dev/scripts/validate-relay-asia-topology-plan.test.mjscloud/docs/relay-workflows.mdcloud/infra/terraform/README.mdcloud/infra/terraform/environments/production.tfvars
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
| # US cells at the Asia 3,000-host shape, each its own additive wave: a was lightest, b ties c. | ||
| "production-gce-c32" = { | ||
| hostname = "c32" | ||
| region = "us-central1" | ||
| zone = "us-central1-a" | ||
| machine_type = "e2-standard-4" | ||
| boot_disk_gb = 30 | ||
| boot_image = "https://www.googleapis.com/compute/v1/projects/cos-cloud/global/images/cos-stable-121-18867-528-21" | ||
| capacity_requests = 6000 | ||
| database_pool_max = 10 # The US default; 16 exists only for the asia-east2 round trip. | ||
| image = "us-central1-docker.pkg.dev/onorca-cloud/orca-cloud/relay@sha256:f30b5cb1ec52b6b6145efecfa1b8be9e3d309403beffd8abcc64197a2087e269" | ||
| initially_enabled = false | ||
| connection_hard_cap = 3000 | ||
| connection_unobserved_bound = 60 | ||
| } | ||
| "production-gce-c33" = { | ||
| hostname = "c33" | ||
| region = "us-central1" | ||
| zone = "us-central1-b" | ||
| machine_type = "e2-standard-4" | ||
| boot_disk_gb = 30 | ||
| boot_image = "https://www.googleapis.com/compute/v1/projects/cos-cloud/global/images/cos-stable-121-18867-528-21" | ||
| capacity_requests = 6000 | ||
| database_pool_max = 10 # The US default; 16 exists only for the asia-east2 round trip. | ||
| image = "us-central1-docker.pkg.dev/onorca-cloud/orca-cloud/relay@sha256:f30b5cb1ec52b6b6145efecfa1b8be9e3d309403beffd8abcc64197a2087e269" | ||
| initially_enabled = false | ||
| connection_hard_cap = 3000 | ||
| connection_unobserved_bound = 60 | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Declaring C33 before it exists can block the C32 topology plan.
The live-images step passes the full relay_gce_cells map to relay-live-cell-image-overlay.mjs. That script throws when a declared non-target cell has no live template. During the C32 wave, C33 is declared but not created, so the overlay can fail with production-gce-c33 is not a target and has no live template. A previous review raised this same problem. Use one of these fixes:
- Plan C32 and C33 as one topology wave.
- Declare C33 in a follow-up PR after C32 exists.
- Make the overlay skip declared cells that have no state template.
The live-image overlay refuses a declared non-target cell with no template, so a lone C32 plan would fail on C33. Registration and promotion stay one cell at a time. Claude-Session: ced32ebb-7155-4413-adad-1eccd14c2010
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The prior review's caution — declaring both US cells deadlocked the topology workflow's live-images step — is resolved in f0154c9, which plans production-gce-c32 and production-gce-c33 as a single topology wave.
- Grouped the two US cells into one topology wave.
prepare-relay-asia-topology-input.mjsandvalidate-relay-asia-topology-plan.mjsnow list['production-gce-c32', 'production-gce-c33']as one wave, so both are targets andoverlayRelayLiveCellImagesno longer throws on C33's missing template. - Tightened the workflow's reviewed request. The
caseadmits onlyproduction:production-gce-c32,production-gce-c33atus-central1; a lone C32 or C33 plan is now rejected. - Kept registration, director configuration and promotion one cell at a time. The admission waves in
operate-relay-asia-admission.mjsremain per-cell; only the topology wave is shared, matching the documented ladder. - Updated tests, docs and the tfvars comment.
usWavePlanbuilds the two-cell plan (changes: 7) and mutates both cells; a new test pins the workflow's single wave;relay-workflows.md, the Terraform README and theproduction.tfvarscomment describe the shared wave.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

ELI5
The US relay fleet is full. Each US relay cell takes about 1,000 hosts, runs at roughly 800 in practice, and has no spare room. This PR adds two new US cells, C32 and C33, each built to hold 3,000 hosts, the same size as the Asia cells. They are declared only: nothing is created until an operator runs the existing rollout workflows, and the cells take no ordinary traffic until each one passes its own five-minute trial.
What Changed
Before: every US cell is capped at 1,000 hosts and runs at about 800 usable with zero headroom. Draining a US cell strands hosts, because there is nowhere for them to go. That also blocks the 17 US cells still on an image from before the crash fix: rolling one drains it, and a drain needs free room elsewhere.
After: two new cells are declared in
us-central1at the 3,000-host shape. Each adds about 2,840 usable hosts once promoted, which is enough room to drain and roll the older US cells.us-central1-a/us-central1-bThe zones are the two least loaded among live US cells. Zone
ahad 6 live cells and zonesbandchad 7 each. Both cells use imagesha256:f30b5cb1…e269, the newest image, which C28, C29 and C31 already run.The pool stays at the US default of 10. Asia uses 16 only because Asia cells sit about 176 ms from the database in
us-central1. A US cell sits next to it.Mechanism. The two Asia workflows were not region-neutral, so this PR generalizes them in place instead of adding a parallel US workflow:
asia-east2. The workflow and validator now read each wave's region from the cell's reviewed zone. Aus-central1wave plans no Asia network, and the validator expects the template a US cell actually gets: no region label or line, and no pool line at the default of 10.asia-east2. They now expect the cell's own region.us-central1cell at pool 10.The two cells were also added to every static list C31 touched:
us-central1/ default pool;The fleet pool list for the shadow gate is unchanged until promotion, the same as C31.
Database connections:
Two cells at pool 10 use 20 connections, which leaves 35 unallocated.
Why
US-targeted fallbacks are not gated for a US canary. The C31 trial measured about 130 of them every five minutes, because hosts that want the US land elsewhere when the US is full. A US cell's canary would fail on that baseline. A baseline comparison was already rejected in #24320 because the count moves for unrelated reasons. Asia-targeted fallbacks are not something a US cell can cause. Both counts are still recorded in the evidence.
Every other gate still applies:
Alternatives considered:
Linked Issue
Fixes #N/A. This is an internal capacity change for the relay fleet.
Visual Proof
N/A. This changes Terraform variables, deploy workflows and their scripts. There is no UI.
Testing
Ran every
node --testfile thatpnpm testruns incloud/, plusrelay-live-cell-image-overlay: 858 passed, 0 failed.terraform fmt -check -recursiveandterraform validatepass. These ran withinit -backend=false, which needs no credentials.terraform consoleon a local-backend copy evaluated the new cells against the variable validations: regionus-central1, pool 10, cap 3,000.The Asia topology waves are checked by running the workflow's own shell blocks. They still produce the same region and the same target list, including the asia-east2 network targets. The C32+C33 wave produces
us-central1, the URL map and the six cell resources. A lone C32 or C33 topology wave is rejected.The admission workflow's promotion block is also run directly. It routes C30 and C31 to an
asia-east2canary and C32 and C33 to aus-central1canary, and it rejects C34 and a two-cell US wave.The validator, input preparer, director-cells script, admission script and evidence script each have new tests for the US shape. Those tests reject an Asia region label or line, a pool of 16, an Asia subnet, and Asia runtime metrics on a US cell. The existing Asia tests pass unchanged.
The trust-probe allowlist is now pinned to the committed rehome source list for c1-c40.
oxlintandpnpm run check:code-quality:changedboth skipcloud/**, so they report nothing for this PR.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No production change until an operator runs the ladder.
plan, thenapply, once forproduction-gce-c32,production-gce-c33.inspect,register,configureandpromote. Promotion runs the cell's own five-minute canary and needs no evidence run.Before running it, confirm that the director still serves
sha256:f30b5cb1…e269. Promotion requires the director's image to equal the cell image. If the director has rolled since this PR, re-pin both cells first. Do not promote while a same-cap restore has just returned an empty general US cell. Placement breaks a load-ratio tie by cell ID, so the canary control would land on that cell and the canary would fail closed.A failed canary returns the cell to migration-only. A follow-up PR then moves the promoted cell to the same-cap general list, as was done for C31. Whether it also joins the shadow gate's fleet pool list is decided then. That list tracks the 16-connection Asia pools.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)