Skip to content

feat(relay): declare Asia cell c31 at the c30 shape - #24310

Merged
Jinwoo-H merged 1 commit into
mainfrom
relay-asia-c31
Oct 1, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
relay-asia-c31

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​140 $\color{#cf222e}{\Huge{\mathbf{−}}}$​43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​97
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60 $\color{#cf222e}{\Huge{\mathbf{−}}}$​27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​33

ELI5

Asia relay traffic is served by four machines that are nearly full. This adds a fifth machine of exactly the same size, so new Asia connections have somewhere to go. The machine is declared here; it starts empty and does not take any traffic until an operator registers and promotes it through the existing reviewed workflows.

What Changed

Before: the Asia region has four relay cells (C27, C28, C29, C30). Together they sit at about 99% of their admission ceiling, so the region is close to refusing new Asia hosts.

After: the code declares a fifth Asia cell, C31, at the same shape as C30: same machine type, 3,000-connection cap, 6,000 request units, database pool of 16. It is pinned to the relay image the director serves today. It goes in zone asia-east2-b, so the five cells spread 2/2/1 across the three zones. Once an operator applies the topology and promotes it, Asia has five cells, one of them empty.

Mechanism. Every Asia workflow refuses any cell it has not been told about by name. That is deliberate: it stops a typo or an unreviewed cell from being created, registered, or rolled. So adding a cell means listing it in each of these places:

  • Terraform cell map (production.tfvars). This declares the machine itself. C31 also joins the regional rehome source list, so hosts that land on it from the wrong region can be moved back off, just like the other Asia cells.
  • Topology workflow and plan validator. These accept C31 as its own single-cell wave in asia-east2-b. The validator still rejects any plan that changes a live cell.
  • Admission workflow and script. These let C31 register alone as migration-only, then be promoted alone. Promotion runs the same five-minute production canary C30 ran, measured on C31 itself, and puts C31 back to migration-only if the canary fails.
  • Canary evidence script. This accepts a C31 canary only if the test load actually landed on C31.
  • Same-cap roll job and wave list. These let a routine image roll include C31. Until its canary promotes it, C31 is listed as migration-only, so a roll hands it back isolated instead of opening it to traffic. The follow-up after promotion moves it to the general list and to the shadow gate's fleet pool list, as was done for C30.
  • Rehome trust probe. This allows the probe to run against C31, since it now carries the rehome identity.
  • Docs. The workflow guide and Terraform README now name C31.

Nothing else changes. No other cell, no US resource, and no SQL, DNS, or certificate is touched. The Cloud SQL connection budget test now counts five Asia pools at 16. The fleet still fits, with 55 connections unallocated under the usable ceiling.

Why

Raising the per-cell connection cap on the existing four cells would also add room. But a capacity change restarts the cell, and a restart drains every host on it. With the region at 99%, that drain has nowhere to go. A new cell adds room without disturbing anyone already connected.

Linked Issue

N/A, internal capacity work.

Visual Proof

N/A. This is infrastructure configuration and operator workflows only, with no UI change.

Testing

  • Automated tests added/updated
  • Ran every cloud/dev/scripts/*.test.mjs with node --test: 796 of 797 pass. The one failure is relay-load-control-peer.test.mjs, which this PR does not touch. It cannot load tweetnacl because the lane worktree has no installed dependencies.
  • New coverage: C31 registers alone beside general C27-C30, and its topology wave is accepted only in asia-east2-b. Its canary is rejected if the load lands on C30. It rolls as a same-cap migration-only cell and cannot share a wave with general C30. C32 is still rejected everywhere.
  • No Terraform plan or apply was run. The topology plan is produced and validated by the reviewed workflow at dispatch time.

Review

Agent skill upstream boundary

  • Not applicable

Notes

Security: no credentials or identities change. Cross-platform, SSH, mobile: not applicable, since this is cloud infrastructure only. Backwards compatibility: every existing cell and wave is still accepted. Only the set of rollback and inspect inputs covering the whole region now includes C31.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A for visual proof with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (cloud scripts are outside these; CI will cover)

Claude-Session: ced32ebb-7155-4413-adad-1eccd14c2010
@pullfrog

pullfrog Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

This run was cancelled 🛑

The workflow was cancelled before completion. Please check the link below for details.

Pullfrog  | View workflow run | via Pullfrog | 𝕏

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 2/5

[High risk] Adds a new production infrastructure cell to deployment automation.

The PR is not safe to merge until the pre-registration workflow regressions and post-promotion same-cap rollback behavior are addressed.

Findings

  1. P1 C31 blocks existing topology waves ▶
  2. P1 Four-cell rollback becomes unavailable ▶
  3. P1 Promoted C31 remains misclassified ▶

Summary

The PR declares C31 as a fifth Asia relay cell and extends the reviewed topology, admission, canary, rehome-trust, same-cap, and budget controls to cover it.

  • C31 is configured in asia-east2-b with the C30 capacity shape and starts outside general admission.
  • The declaration also affects existing topology and rollback operations before registration; the static same-cap classification becomes unsafe if C31 is promoted before the documented follow-up change.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Declare[C31 declared] --> Topology[Apply C31 topology]
  Topology --> Register[Register migration-only]
  Register --> Configure[Configure director]
  Configure --> Promote[Promote and canary C31]
  Promote --> FollowUp[Move C31 to same-cap general list]
  Promote -->|Before follow-up| Roll[Same-cap rollback misclassifies C31]
Loading

Reviews (1) · Last reviewed commit: "feat(relay): declare Asia cell c31 at th..."

connection_hard_cap = 3000
connection_unobserved_bound = 60
}
"production-gce-c31" = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 C31 blocks existing topology waves

Until C31 has been applied, it has no live template. The topology workflow passes the complete declared cell map to an image check that rejects any non-target cell without a live template. As a result, an operator trying to plan or re-run the still-allowed C30 wave hits an error before a validated plan is produced.

Knowledge Base Used: Cloud relay and notification services

Comment on lines +22 to +25
allCells: [
'production-gce-c27', 'production-gce-c28', 'production-gce-c29', 'production-gce-c30',
'production-gce-c31'
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Four-cell rollback becomes unavailable

While C31 is declared but not yet registered, the previously accepted rollback of C27–C30 is rejected because the full Asia set now includes C31. Requesting all five cells also fails: rollback checks that each cell exists in the admission selector, and C31 does not yet exist there. Operators must roll back the registered cells in separate waves rather than one atomic operation.

Knowledge Base Used: Cloud relay and notification services

Comment on lines +8 to +10
export const SAME_CAP_MIGRATION_ONLY_CELLS = [
'production-gce-c17', 'production-gce-c18', 'production-gce-c31'
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Promoted C31 remains misclassified

This PR permits C31 to be promoted to general admission, but same-cap rolls still treat it as migration-only until a later code change. If an operator then starts a same-cap rollback, the job accepts C31’s live state and isolates the serving cell. It checks for the expected migration-only no-op only after isolation, so the job fails and its cleanup leaves C31 isolated, disrupting its hosts.

Knowledge Base Used: Cloud relay and notification services

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 41f04b31-ce11-473a-bca0-572abfc9e30b

📥 Commits

Reviewing files that changed from the base of the PR and between d4ae6a9 and 5d925ba.

📒 Files selected for processing (23)
  • .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.yml
  • cloud/dev/scripts/operate-relay-asia-admission.mjs
  • cloud/dev/scripts/operate-relay-asia-admission.test.mjs
  • cloud/dev/scripts/prepare-relay-asia-topology-input.mjs
  • cloud/dev/scripts/prepare-relay-asia-topology-input.test.mjs
  • cloud/dev/scripts/prepare-relay-production-capacity-canary.test.mjs
  • cloud/dev/scripts/probe-relay-rehome-trust.mjs
  • cloud/dev/scripts/probe-relay-rehome-trust.test.mjs
  • cloud/dev/scripts/relay-asia-rollout-evidence.mjs
  • cloud/dev/scripts/relay-asia-rollout-evidence.test.mjs
  • cloud/dev/scripts/relay-asia-topology-workflow.test.mjs
  • cloud/dev/scripts/relay-cloud-sql-connection-budget.test.mjs
  • cloud/dev/scripts/relay-production-same-cap-wave.mjs
  • cloud/dev/scripts/relay-production-same-cap-wave.test.mjs
  • cloud/dev/scripts/relay-same-cap-script-census.test.mjs
  • cloud/dev/scripts/relay-staging-c4-refresh-workflow.test.mjs
  • cloud/dev/scripts/validate-relay-asia-topology-plan.mjs
  • cloud/dev/scripts/validate-relay-asia-topology-plan.test.mjs
  • cloud/docs/relay-workflows.md
  • cloud/infra/terraform/README.md
  • cloud/infra/terraform/environments/production.tfvars

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The production Asia configuration adds C31 in asia-east2-b as a separate topology wave. Admission and canary workflows support C31 registration and promotion, and same-cap and rehome checks include the cell. Tests and documentation reflect the new topology and its operational settings.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 5d925

C31 is declared as a separate Asia rollout wave with admission initially disabled and operator-controlled registration and promotion. No actionable merge-blocking issue is established; normal checks and the existing deployment-plan validation remain necessary.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 5d925

The change adds bounded production capacity using existing staged admission, cell-specific canary and recovery controls. No introduced security weakness was established, but live permissions and deployment outcomes remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly added serving scope is one production Asia cell with a 3,000-connection ceiling. Failure containment also depends on the shared admission selector and SQL capacity, so consequences cannot be assumed to remain isolated to C31. The inspected evidence does not establish tenant-level isolation or maximum impact from compromised workload credentials.

Trust Boundaries and Controls

  • observed — Operator-supplied workflow inputs reach production mutation only through main-branch and operations-enabled gating, the selected deployment environment, exact input and confirmation checks, and existing workload-identity authentication. The inspected diffs extend C31 eligibility without changing those identity inputs or workflow permission declarations.
  • observed — Canary evidence generation checks the selected cell’s load placement, runtime metrics, minimum duration and Cloud SQL headroom. C31 therefore cannot retain a successful workflow canary merely by exercising C30; this control operates after temporary general admission, as it already did for C30.

Resilience and Maintainability Implications

  • observed — Production workflows share a non-cancelling rollout concurrency group, while selector operations use generation checks, exact membership and attempt recovery. These controls constrain repetition and conflicting mutations; server-side atomicity and recovery after loss of the execution environment were not verified.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and covers the change, rationale, testing, impact, and checklist. However, the required Linked Issue section contains N/A instead of an actual issue link. Add the actual linked issue that this PR addresses, or document the repository-approved maintainer exception if no issue is required for this internal change.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 17 files. (6 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding Asia relay cell C31 with the C30 shape.
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: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 17 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

Comment @coderabbitai help to get the list of available commands.

@Jinwoo-H
Jinwoo-H merged commit 3e5c8d9 into main Oct 1, 2026
27 of 28 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