Repository navigation
fix(relay): accept production cells past c29 in the regional rehome operator - #22518
Conversation
…perator The selector membership check capped cell ids at c29, so enable failed closed with "selector membership is invalid" once c30 went general. Accept c1-c99 with no leading zero. Claude-Session: ced32ebb-7155-4413-adad-1eccd14c2010
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Widen the operator's cell shape check —
operate-relay-regional-rehome.mjsreplaces the inlinec1–c29regex with a namedPRODUCTION_CELL_ID = /^production-gce-c[1-9][0-9]?$/, so production cells up toc99parse whilec0,c100, leading-zero, duplicate, empty, and non-productionnames still fail. - Pin the new boundary with a test —
operate-relay-regional-rehome.test.mjsadds coverage that acceptsc9/c29/c30/c99and rejectsc0/c100/c09/a duplicate/staging-gce-c30/an empty list.
I confirmed the PR's safety argument independently: the shape check is argument hygiene only, and operateRegionalRehome still requires exactMembership against the live selector before any mutation (operate-relay-regional-rehome.mjs:272-276), so the looser bound cannot enable a wrong membership. I also verified why the monitor accepted the same list and the operator did not — the monitor validates against its configured cell set rather than a shape regex (cloud/apps/relay-ops/src/incident-monitor-cli.ts:156-174). The new assertions do fail under the old pattern (c30/c99 would throw), and the file passes under node --test.
DeepSeek 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 (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe production cell validator now accepts IDs from Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The expanded production-cell range has no identified issue requiring a fix before merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |

ELI5
The script that turns regional rehoming on checks that every cell name it is given looks right. That check only knew about cells numbered up to 29. Production now has cell 30, so the check refused a correct list and the enable step stopped.
What Changed
Before: running "Operate Relay Production Rehome" with mode=enable and the current general cell list failed at "Apply exact durable regional rehome enable" with
selector membership is invalid. The monitor workflow accepted the same list, so the two workflows disagreed.After: the operator script accepts any
production-gce-c<N>from 1 to 99 written without a leading zero, so the list that includes c30 passes. It still refuses an empty list, duplicate cells,c0,c100,c09, and names from other environments.Mechanism: the membership check in
cloud/dev/scripts/operate-relay-regional-rehome.mjsused a pattern that spelled out 1-9 and 10-29. It now uses one named pattern for 1-99.Why
A list of allowed numbers has to be edited every time a cell is added, and forgetting it blocks an audited production step. A two-digit bound still rejects typos and junk while leaving room for new cells. The director remains the real authority: the script compares the given list against the live selector before changing anything, so a looser shape check cannot enable a wrong membership.
Linked Issue
Fixes the failed enable in workflow run 35899848244.
Visual Proof
N/A. This is an operator script with no UI.
Testing
A new test checks that c9, c29, c30 and c99 are accepted and that c0, c100, c09, a duplicate, a staging name, and an empty list are rejected. It fails against the old pattern and passes with the fix. The rehome operator, rehome workflow, and rehome trust probe test files all pass under
node --test.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 desktop, mobile, SSH, or cross-platform surface. The script only runs in the production rehome workflow.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)