Skip to content

feat(relay): declare Asia spare cell c34 as migration-only - #25336

Merged
Jinwoo-H merged 1 commit into
mainfrom
relay-asia-spare-cell
Oct 5, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
relay-asia-spare-cell

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​62
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​48 $\color{#cf222e}{\Huge{\mathbf{−}}}$​12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36

ELI5

Asia relay traffic runs on five machines. When one of them has to be restarted, its connections need somewhere to go, and today there is no empty Asia machine to catch them. This adds a sixth Asia machine of the same size that stays empty on purpose: ordinary new connections never land on it, and it only receives connections that an operator or a drain explicitly moves there.

Merging creates nothing. The machine appears only when an operator runs the existing topology workflow, and it takes no traffic until it is registered and the director is told about it.

What Changed

Before: Asia has C27-C31, all general (they take ordinary placement). There is no Asia spare, so draining an Asia cell has to fit into the other four cells' free seats.

After: the code declares C34, an Asia spare at the C31 shape:

Setting C34 C27-C31
Zone asia-east2-c (zones become 2/2/2) a/b/c/a/b
Connection hard cap 3,000 3,000
Request units 6,000 6,000
Database pool 16 16
Machine e2-standard-4, 30 GB balanced disk same
Image relay@sha256:f30b5cb1…e269 C28/C29/C31 (and C32/C33, all US 1k cells) serve this

The image is the newest cell image the fleet serves. The director moved to 933c05ec on 10-01, but that build changed only director code (#24446), and no cell has run it yet.

Mechanism. Every Asia workflow refuses a cell it was not told about by name, so C34 is listed in each place C31 was, with one deliberate difference: it has no promotion wave.

  • Terraform cell map (production.tfvars): declares the machine, and makes it a regional rehome source like every other Asia cell. The rehome settings are per-cell, so they reach only C34's own template.
  • Topology workflow and plan validator: accept C34 as its own single-cell wave in asia-east2-c only.
  • Admission script: C34 registers alone as migration-only and can be inspected, verified, configured and rolled back. promote and recover-promotion reject it. The workflow's promotion case also has no C34 entry, and there is no canary-evidence entry for it.
  • Same-cap roll job and wave list: C34 is in the migration-only list, so a routine image roll hands it back isolated instead of opening it to traffic.
  • Shadow gate fleet pool list (FLEET_POOL_CELL_IDS): unchanged. C34 is not added.
  • Rehome trust probe: accepts C34 because it carries the rehome identity.
  • Docs: the workflow guide and Terraform README name C34 and explain that it is a spare.

No other cell, US resource, SQL, DNS, or certificate is touched.

Database connections (relay-cloud-sql-connection-budget.mjs):

Before After
Relay cell connections 300 316
Configured maximum 385 401
Operating maximum (usable ceiling 490) 455 471
Unallocated 35 19

This fits, but it is the last Asia-shaped cell the shared instance can take at pool 16. An idle migration-only cell opens few of its 16 connections in practice.

Why

The relay redesign (decision §7, Q2) calls for one spare per region. For Asia that means a sixth cell at the 3k shape, kept migration-only. The spare is a precondition for paced drains and parallel rolls.

Alternatives considered:

  • Raise the cap on an existing Asia cell. That restarts the cell, which drains every host on it into a region with no slack.
  • Declare it general. It would take ordinary placement and stop being a spare.
  • Keep a promotion path ready. Promotion stays a separate reviewed change, so this PR cannot make the spare general by accident.

Linked Issue

N/A, internal capacity work (relay redesign batch 1).

Visual Proof

N/A. Infrastructure configuration and operator workflows only, no UI.

Testing

  • Automated tests added/updated
  • node --test dev/scripts/*.test.mjs from cloud/: 827 of 828 pass. The one failure is relay-load-control-peer.test.mjs, which this PR does not touch. It cannot load tweetnacl in a lane worktree without installed dependencies, which matches the baseline.
  • New coverage: C34 registers alone as migration-only in asia-east2 and stays out of general. promote and recover-promotion reject it, and it cannot share a register wave with C33. Its topology wave is accepted only in asia-east2-c at pool 16. It rolls as a same-cap migration-only cell. C35 is still rejected everywhere.
  • Read-only targeted Terraform plan on this branch against production state (-refresh=false -lock=false), using the topology workflow's exact target set and its live-image overlay:
    • Result: Plan: 3 to add, 1 to change, 0 to destroy.
    • The 3 creates are C34's instance template, MIG and backend service. The 1 update is the shared URL map adding the c34.relay.onorca.dev host rule. Every other resource is a no-op, including the asia-east2 subnet, router and NAT.
    • Zero existing templates, MIGs or backends change.
    • The workflow's own prepare-relay-asia-topology-input.mjs and validate-relay-asia-topology-plan.mjs both accept this plan: {"environment":"production","cells":["production-gce-c34"],"changes":4}.
  • production-gce-c34 is free everywhere checked:
    • live selector (generation 344, read-only inspect run 37248143823);
    • Terraform state;
    • GCE templates, MIGs, instances and backends;
    • main's tfvars.

Review

Agent skill upstream boundary

  • Not applicable

Notes

  • Security: no credentials or identities change.
  • Cross-platform, SSH, mobile: not applicable; this is cloud infrastructure only.
  • Backwards compatibility: every existing cell and wave is still accepted. Only the whole-region inspect and rollback sets now include C34.
  • Rebased onto chore(relay): move US cells c32 and c33 to the general same-cap list after promotion #25367, which moved C32/C33 to the general same-cap list. C34 is now the only addition to the migration-only list beside C17/C18. The docs also note that the multi-target promote-general-cell / retire-migration-cell modes accept any migration-only cell, so they must not name C34. Placement and regional rehome only select general cells.
  • Ordering after merge: the topology workflow's live-image step refuses a declared cell that has no template yet and is not in the wave. Until C34's topology apply, any other topology plan fails, as happened with C32/C33. Same-cap jobs are unaffected; they read the map with terraform console, which handles an uncreated cell.

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)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one sequencing note and a stale doc reference. The C34 declaration is consistent everywhere I could trace, and the deliberate omissions (fleet pool list, canary registry, promotion wave) are justified.

Reviewed changes

This PR declares a sixth Asia relay cell, production-gce-c34, as a migration-only spare at the C31 shape in asia-east2-c.

  • Terraform cell map — adds production-gce-c34 (e2-standard-4, 30 GB, 6,000 requests, pool 16, hard cap 3,000, C31 image f30b5cb1…e269) and lists it in relay_region_rehome_source_cell_ids.
  • Topology workflow + validators — accept C34 as its own single-cell wave in asia-east2-c (zones become 2/2/2, pool 16); prepare-relay-asia-topology-input and validate-relay-asia-topology-plan gain the zone/pool entry.
  • Admission script — C34 enters allCells and a lone registration wave, with no promotion wave, so promote/recover-promotion reject it at the parser.
  • Same-cap roll — C34 joins SAME_CAP_MIGRATION_ONLY_CELLS, so a routine image roll returns it isolated (entry admission migration-only, selector delta 0).
  • Rehome trust probe — allowlist regex and comment now include 34 / “six”.
  • Connection budget — Asia cells 5→6: cells 300→316, configured max 385→401, unallocated 35→19, still withinBudget.
  • Tests/docs — new coverage for registration, rehome trust, topology plan, and budget; workflow guide and Terraform README name the spare.

ℹ️ Whole-region rollback now requires C34 to be registered first

SHAPES.production.allCells is the target set for both the whole-region inspect and the whole-region rollback, and this PR adds C34 to it. inspect resolves an unregistered cell to 'absent' via inspectedMembershipStates, but rollback calls selectorCellState, which throws selector does not contain production-gce-c34. Between this merge and C34’s registration, a whole-region rollback is accepted by the parser/workflow and then fails at runtime. It fails safe (the validation loop throws before any apply), and it mirrors how C32/C33 were introduced, but C34 is a dormant spare that may stay unregistered for a while — worth confirming this is intended, or making rollback tolerate a declared-but-absent cell the way inspect does.

Technical details
# Whole-region rollback vs. an unregistered C34

## Affected sites
- `cloud/dev/scripts/operate-relay-asia-admission.mjs:24` — C34 added to `allCells`.
- `cloud/dev/scripts/operate-relay-asia-admission.mjs:353-358` — `rollback` branches on `selectorCellState`, which throws for a cell absent from the selector.
- `cloud/dev/scripts/operate-relay-asia-admission.mjs:176-186` — `inspectedMembershipStates` (used by `inspect`) maps an absent cell to `'absent'` instead.
- `cloud/dev/scripts/operate-relay-asia-admission.test.mjs:556` — whole-region rollback accepted with C34; `:562` whole-region inspect accepted with C34.

## Required outcome
- Decide whether whole-region rollback should keep rejecting an unregistered declared cell (current behavior, fails fast) or tolerate it like inspect.

## Open questions for the human
- Is whole-region rollback expected to be usable before every declared cell is registered? If yes, it should not hard-fail on a declared-but-unregistered spare.

ℹ️ Nitpicks

  • cloud/docs/relay-workflows.md:169 still says “The production Asia set is C27-C31” and line 170 “the five cells spread 2/2/1”, which now contradicts the C34 paragraph added below it (“the six Asia cells spread 2/2/2”).

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The change adds production cell C34 in asia-east2-c, with a 3,000-connection hard cap and a database pool maximum of 16. Topology and deployment tooling recognize it as a separate wave. Admission tooling registers it as a migration-only spare and does not allow promotion. Rehome checks and connection-budget tests include C34, and the workflow documentation describes its placement and restrictions.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to 83b7f

C34 can be moved out of its reserved migration-only role through production lifecycle commands, including a canary activation that makes it eligible for general placement. Add guards before merging to preserve the spare’s restricted role.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 83b7f

The normal deployment and admission workflows keep C34 out of ordinary placement. However, an existing privileged capacity tool newly accepts C34 and can activate it as a general cell, contrary to the spare-cell policy. This requires authorized administrative credentials; no unauthenticated promotion or new privilege escalation was established. Actual production deployment and access settings remain unverified.

Retained concerns

  • Medium · architecture · observed: Adding C34 to the shared same-cap allowlist makes the privileged capacity-canary activate command accept it and commit general admission without the reviewed C34 promotion wave. The normal workflows prevent this transition, but the mutation helper does not enforce the migration-only class. This creates lifecycle-control drift that can consume the intended evacuation spare; it does not bypass administrative authentication.
Security review details

Security Blast Radius

  • inferred — The direct policy-drift path changes C34's admission within the production selector; it does not confer new administrator privileges. Separately, a compromise of the new runtime could expose the shared production relay database credentials and assignment-signing key. That credential scope is inherited from existing cells and is broader than C34's own sessions, rather than a newly introduced per-cell isolation guarantee.

Security Findings and Attack Paths

  • observed — For a registered C34, an authenticated capacity-canary invocation selecting same-cap and activate can request general admission despite the documented migration-only contract. A ready, enabled general C34 can then appear in the region catalog. This is a privileged operational-policy bypass, not an established unauthenticated attack or privilege escalation.

Trust Boundaries and Controls

  • observed — Admission mutation requires a verified Google service-account token with the configured audience, and route authorization permits deploy and capacity identities to apply the selector. Monitor and proof identities have narrower routes. Neither the route schema nor selector mutation encodes C34's migration-only classification.

Resilience and Maintainability Implications

  • inferred — Exact membership, generation checks, transactional updates, and committed-attempt recovery contain concurrent or interrupted admission changes. They cannot prevent a semantically incorrect but authorized promotion. Keeping lifecycle classification only in selected callers leaves the spare-cell guarantee dependent on which operational entrypoint is used.

Hardening Proposals

  • proposed — Enforce migration-only classification in the shared capacity mutation helper so activate rejects C34 while isolate and drain remain available. If a privileged override is intentional, give it a separate explicit policy rather than allowing ordinary same-cap target acceptance to imply promotion eligibility.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 14 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: declaring Asia spare cell C34 as migration-only.
Description check ✅ Passed The description covers the required change, rationale, testing, visual proof, linked-issue context, and checklist. It also reports the test failure and checks not yet run. The empty Review section and…
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 14 files. (1 skipped: 1 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

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.

Adds a sixth asia-east2 cell at the C31 shape (cap 3000, 6000 request
units, pool 16, e2-standard-4) in asia-east2-c, pinned to the f30b5cb1
cell image. It gets its own topology and registration wave but no
promotion wave, so the admission script and workflow refuse to promote
it; it stays a migration-only landing zone and out of the fleet pool list.

Claude-Session: 1145a80d-dec4-4a9b-9373-bbbb876b9041
@Jinwoo-H
Jinwoo-H force-pushed the relay-asia-spare-cell branch from fd9b1ad to 83b7f08 Compare October 5, 2026 02:40

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Re-reviewed the delta since the prior pullfrog review (fd9b1ad → 83b7f08). The branch was rebased onto main after #25367 promoted US C32/C33 to general, and the same-cap migration-only list, its tests, and the workflow doc were reconciled. The net effect versus main is unchanged — only C34 is declared.

  • Dropped C32/C33 from SAME_CAP_MIGRATION_ONLY_CELLS, leaving C17, C18, and the C34 spare migration-only.
  • Updated the same-cap wave test to assert C34 beside C17/C18 and C30-C33 as general.
  • Adjusted the script-census assertion to exclude C34 from the migration-only side, since C34 is a declared rehome source.
  • Recorded C32/C33's promotion to general in relay-workflows.md.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fe2cf43-3c04-4f0d-8c6f-c6162aa4e316
📥 Commits

Reviewing files that changed from the base of the PR and between fd9b1ad and 83b7f08.

📒 Files selected for processing (4)
  • 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/docs/relay-workflows.md

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

Comment on lines +7 to +10
// C34 is an Asia spare that stays migration-only by policy.
export const SAME_CAP_MIGRATION_ONLY_CELLS = [
'production-gce-c17', 'production-gce-c18', 'production-gce-c34'
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

git diff --unified=8 aac1c8f9c202700e3b6887806323be38af1be4b1 83b7f086754009e8e7c787b911462366eadc9167 -- cloud/dev/scripts/relay-production-same-cap-wave.mjs cloud/dev/scripts/prepare-relay-production-capacity-canary.mjs cloud/dev/scripts/prepare-relay-production-capacity-canary.test.mjs
rg -n 'SAME_CAP_CELLS|SAME_CAP_MIGRATION_ONLY_CELLS|approved-cells|prepareProductionCapacityCell|mode.*activate' cloud/dev/scripts/relay-production-same-cap-wave.mjs cloud/dev/scripts/prepare-relay-production-capacity-canary.mjs cloud/dev/scripts/prepare-relay-production-capacity-canary.test.mjs

Repository: stablyai/orca

Length of output: 7713


🏁 Script executed:

nl -ba cloud/dev/scripts/prepare-relay-production-capacity-canary.mjs | sed -n '1,175p'
printf '\n--- focused tests ---\n'
nl -ba cloud/dev/scripts/prepare-relay-production-capacity-canary.test.mjs | sed -n '130,215p'

Repository: stablyai/orca

Length of output: 11619


Reject activation for migration-only cells.

SAME_CAP_CELLS must continue to allow C34 for isolate and drain, but --mode activate must reject migration-only cells. The current branch maps every non-isolate mode to general, so activation can commit C34 as general and enable general placement.

Suggested fix
-import { SAME_CAP_CELLS } from './relay-production-same-cap-wave.mjs'
+import {
+  SAME_CAP_CELLS,
+  SAME_CAP_MIGRATION_ONLY_CELLS
+} from './relay-production-same-cap-wave.mjs'
...
   if (config.mode === 'drain') {
...
     return { changed: false, drained: true, paceWindowMs: 0 }
   }
+  if (
+    config.mode === 'activate' &&
+    SAME_CAP_MIGRATION_ONLY_CELLS.includes(config.cellId)
+  ) {
+    throw new Error('migration-only production capacity target cannot be activated')
+  }
   const before = await inspectAdmissionSelector(post)

Comment on lines +227 to +228
Do not name it in the multi-target `promote-general-cell` or `retire-migration-cell` modes, which
accept any migration-only cell. It is a declared rehome source, sits in the same-cap migration-only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n -C 8 'promote-general-cell|retire-migration-cell|migration-only|production-gce-c34' \
  cloud/dev/scripts/operate-relay-asia-admission.mjs \
  cloud/dev/scripts/operate-relay-asia-admission.test.mjs

Repository: stablyai/orca

Length of output: 39218


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- admission relevant declarations/branches ---'
rg -n 'function parseRelayAsiaAdmissionArguments|const parseRelayAsiaAdmissionArguments|mode.*promote|mode.*retire|promotionWaves|PRODUCTION_CANARY_CELL|C34' cloud/dev/scripts/operate-relay-asia-admission.mjs cloud/dev/scripts/operate-relay-asia-admission.test.mjs
printf '%s\n' '--- argument parser and operation ---'
sed -n '100,220p' cloud/dev/scripts/operate-relay-asia-admission.mjs
sed -n '300,490p' cloud/dev/scripts/operate-relay-asia-admission.mjs
printf '%s\n' '--- rejected-argument tests ---'
sed -n '530,615p' cloud/dev/scripts/operate-relay-asia-admission.test.mjs
printf '%s\n' '--- locate retirement mode implementation ---'
rg -n -i -C 4 'retire-migration-cell|promote-general-cell' cloud/dev cloud/docs
printf '%s\n' '--- documentation diff against exact merge base ---'
git diff --unified=12 aac1c8f9c202700e3b6887806323be38af1be4b1 83b7f086754009e8e7c787b911462366eadc9167 -- cloud/docs/relay-workflows.md

Repository: stablyai/orca

Length of output: 41302


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- generic lifecycle mode implementation ---'
sed -n '2780,2905p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- generic lifecycle tests ---'
sed -n '1600,1760p' cloud/dev/scripts/deploy-relay-gce-multi-target.test.mjs
printf '%s\n' '--- generic target argument validation ---'
sed -n '55,120p' cloud/dev/scripts/operate-relay-asia-admission.mjs
sed -n '135,220p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- topology policy references ---'
rg -n -C 3 'production-gce-c34|migrationOnly|rehome|existing-only|migration-only' cloud --glob '*topology*' --glob '*.json' --glob '*.mjs' | head -200

Repository: stablyai/orca

Length of output: 37149


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- helper definitions ---'
rg -n 'function inspectGeneralPromotionTarget|const inspectGeneralPromotionTarget|function selectMultiTargetDeployments|function targetIds|function verifySelectorCompatibleDirector|function verifyActiveSelectorDirector' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
sed -n '2380,2525p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- target selection and topology fixture ---'
rg -n -C 5 'target-cell-ids|target1|target2|production-gce-c34' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs cloud/dev/scripts/deploy-relay-gce-multi-target.test.mjs cloud/dev --glob '*topology*' | head -240

Repository: stablyai/orca

Length of output: 26179


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- selection logic ---'
sed -n '330,390p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- selector director and promotion target checks ---'
sed -n '390,520p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
sed -n '1035,1115p' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- topology and target binding during execution ---'
rg -n 'loadTopology|readFile.*topology|selectMultiTargetDeployments\\(|targetCellIds.map|targets = ' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs | tail -60

Repository: stablyai/orca

Length of output: 9315


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- production C34 topology declarations ---'
rg -n -F -- 'production-gce-c34' cloud --glob '!**/node_modules/**' --glob '!**/dist/**' | head -100
printf '%s\n' '--- generic topology-to-target execution flow ---'
rg -n 'selectMultiTargetDeployments|function runMultiTargetDeployment|export async function runMultiTargetDeployment|readFileSync|readFile\\(' cloud/dev/scripts/deploy-relay-gce-multi-target.mjs

Repository: stablyai/orca

Length of output: 5416


🏁 Script executed:

#!/bin/bash
set -e
file=cloud/dev/scripts/deploy-relay-gce-multi-target.mjs
printf '%s\n' '--- generic topology and target call sites ---'
rg -n -F 'selectMultiTargetDeployments(' "$file" || test "$?" -eq 1
rg -n -F 'topologyFile' "$file" || test "$?" -eq 1
rg -n -F 'topology-file' "$file" || test "$?" -eq 1
rg -n -F 'readFile' "$file" || test "$?" -eq 1
printf '%s\n' '--- production C34 topology entry ---'
sed -n '440,510p' cloud/infra/terraform/environments/production.tfvars

Repository: stablyai/orca

Length of output: 3871


Reject C34 in both generic lifecycle modes.

Each mode accepts one target. When the supplied topology includes C34 and its selector state is migration-only, promote-general-cell can move it to general, and retire-migration-cell can move it to existing-only. Add a C34 guard to both handlers and tests for both rejections.

Suggested guards
 if (config.mode === 'promote-general-cell') {
   if (!selectorActive) throw new Error('admission selector boundary is not active')
   const [promoted] = targets
+  if (promoted?.cellId === 'production-gce-c34') {
+    throw new Error('C34 is a reserved migration-only spare')
+  }
   if (
     !promoted ||
     selectorCellState(selectorInspection.selector, promoted.cellId) !== 'migration-only'
   ) {
     throw new Error('promoted cell admission must be migration-only')
   }

 if (config.mode === 'retire-migration-cell') {
   if (!selectorActive) throw new Error('admission selector boundary is not active')
   const [retiring] = targets
+  if (retiring?.cellId === 'production-gce-c34') {
+    throw new Error('C34 is a reserved migration-only spare')
+  }
   if (
     !retiring ||
     selectorCellState(selectorInspection.selector, retiring.cellId) !== 'migration-only'
   ) {
     throw new Error('retired cell admission must be migration-only')
   }

@Jinwoo-H
Jinwoo-H merged commit b94cfa7 into main Oct 5, 2026
24 checks passed
Jinwoo-H added a commit that referenced this pull request Oct 12, 2026
* feat(relay): declare Asia spare cell c35 as migration-only

Adds a seventh asia-east2 cell at the C34 shape (cap 3000, 6000 request
units, pool 16, e2-standard-4) in asia-east2-a, pinned to image F. It gets
its own topology and registration wave but no promotion wave, so the
admission script and workflow refuse to promote it; it stays a
migration-only spare and out of the fleet pool list. Mirrors #25336.

* test(relay): accept the c35 spare under the same-cap capacity allowlist
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