diff --git a/cloud/dev/scripts/relay-same-cap-script-census.test.mjs b/cloud/dev/scripts/relay-same-cap-script-census.test.mjs index 743aef7fc2d..7d5e4fee73e 100644 --- a/cloud/dev/scripts/relay-same-cap-script-census.test.mjs +++ b/cloud/dev/scripts/relay-same-cap-script-census.test.mjs @@ -179,9 +179,10 @@ describe('same-cap roll scripts accept every same-cap cell', () => { it('validates a correct plan for every wave cell at that cell\'s rehome protocol', () => { for (const cellId of SAME_CAP_CELLS) { - const [region, cap] = resolveCellShape(cellId).stdout.trim().split(' ') + const [, cap] = resolveCellShape(cellId).stdout.trim().split(' ') const protocol = REHOME_SOURCE_CELLS.has(cellId) ? 1 : 0 - assert.equal(protocol, region === 'us-central1' ? 1 : 0, cellId) + // Every reviewed serving cell carries rehome trust now, in either region. + assert.equal(protocol, 1, cellId) const config = { mode: 'same-cap-cell', cellId, @@ -211,6 +212,29 @@ describe('same-cap roll scripts accept every same-cap cell', () => { } }) + it('validates a protocol-0 plan for a cell outside the rehome source list', () => { + const cellId = 'production-gce-c17' + assert.equal(REHOME_SOURCE_CELLS.has(cellId), false) + const config = { + mode: 'same-cap-cell', + cellId, + hardCap: 1000, + unobservedBound: 60, + image: TARGET_IMAGE, + rollbackImage: ROLLBACK_IMAGE, + rehomeDirectorServiceAccount: DIRECTOR_IDENTITY, + rehomeAudience: AUDIENCE, + regionalRehomeProtocol: '0' + } + const plan = rollPlan({ cellId, cap: 1000, protocol: 0 }) + assert.deepEqual(validateCapacityPlan(plan, config), { mode: 'same-cap-cell', changes: 2 }) + // Protocol 1 must reject a plan with no rehome lines, or the absent-line rule decides nothing. + assert.throws( + () => validateCapacityPlan(plan, { ...config, regionalRehomeProtocol: '1' }), + /reviewed image and capacity/ + ) + }) + it('leaves the US-only capacity job on the default allowlist', () => { assert.doesNotMatch(capacityWorkflow, /--approved-cells/) }) diff --git a/cloud/infra/terraform/environments/production.tfvars b/cloud/infra/terraform/environments/production.tfvars index 8e442c75900..e1522b3827e 100644 --- a/cloud/infra/terraform/environments/production.tfvars +++ b/cloud/infra/terraform/environments/production.tfvars @@ -402,7 +402,11 @@ relay_region_rehome_source_cell_ids = [ "production-gce-c23", "production-gce-c24", "production-gce-c25", - "production-gce-c26" + "production-gce-c26", + # Asia cells carry the same trust so mis-homed hosts can be drained back off them. + "production-gce-c27", + "production-gce-c28", + "production-gce-c29" ] # Slack #orca-relay-alerts, created out of band on 2026-08-05. Declared here because an apply diff --git a/cloud/infra/terraform/relay-gce-cells.tf b/cloud/infra/terraform/relay-gce-cells.tf index a4505ba2e37..5023b7e1d50 100644 --- a/cloud/infra/terraform/relay-gce-cells.tf +++ b/cloud/infra/terraform/relay-gce-cells.tf @@ -82,14 +82,15 @@ check "relay_gce_fixed_one_topology" { assert { condition = alltrue([ + # Region is not asserted here: the director's own rehome source and target predicates + # own eligibility, so this pins only cell shape. for cell_id in var.relay_region_rehome_source_cell_ids : try( - var.relay_gce_cells[cell_id].region == var.region && var.relay_gce_cells[cell_id].connection_hard_cap != null && !contains(var.relay_gce_fenced_cells, cell_id), false ) ]) - error_message = "Regional rehome sources must be configured, unfenced primary-region GCE cells with explicit connection limits." + error_message = "Regional rehome sources must be configured, unfenced GCE cells with explicit connection limits." } assert { diff --git a/cloud/infra/terraform/variables.tf b/cloud/infra/terraform/variables.tf index 91f67e8ebe0..57d73fe75b4 100644 --- a/cloud/infra/terraform/variables.tf +++ b/cloud/infra/terraform/variables.tf @@ -245,7 +245,7 @@ variable "relay_regional_placement_enabled" { variable "relay_region_rehome_source_cell_ids" { type = set(string) - description = "Reviewed US Relay cells allowed to advertise and accept the regional rehome source protocol." + description = "Reviewed Relay cells, in any configured region, allowed to advertise and accept the regional rehome source protocol." default = [] }