Repository navigation
feat(relay-ops): allow the migration-only cells c17 and c18 in same-cap waves - #21307
Conversation
…ap waves c17 and c18 hold no hosts and sit outside general admission, so rolling one displaces nobody. They are the only zero-displacement canary for a new cell image, but the same-cap wave refused them at the dispatch validator and would have promoted them to general at the end if it had not. Add them to the approved list and teach the wave a cell's entry admission class: the precheck demands the class the cell is declared to serve in, the restore hands it back that class, the isolate on an already-isolated cell is asserted to change nothing, and the selector generation advances by 2 for a general cell and by 0 for a migration-only one. One wave may not mix the two, because every cell after the first offsets from a single per-wave delta. Neither cell is a declared regional-rehome source, so its template carries no rehome trust lines. The source-membership guard now fires exactly when a roll expects those lines instead of for every US cell, which is the invariant it was standing in for, and which limits c17 and c18 to rehome protocol 0.
|
This run was cancelled 🛑 The workflow was cancelled before completion. Please check the link below for details. |
|
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)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe same-cap rollout now supports migration-only cells C17 and C18. The wave script reports each cell's admission and selector-wave delta, and rejects mixed-class waves. The deployment workflow uses those values for generation, preflight, rehome validation, membership, and restore behavior. Migration-only cells use idempotent isolation and general cells use activation. Tests and documentation cover the new classifications and lifecycle rules. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The migration-only rollout changes have no identified actionable issue that should block merging. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 7 files. (2 skipped: 2 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 |
…ap waves (stablyai#21307) c17 and c18 hold no hosts and sit outside general admission, so rolling one displaces nobody. They are the only zero-displacement canary for a new cell image, but the same-cap wave refused them at the dispatch validator and would have promoted them to general at the end if it had not. Add them to the approved list and teach the wave a cell's entry admission class: the precheck demands the class the cell is declared to serve in, the restore hands it back that class, the isolate on an already-isolated cell is asserted to change nothing, and the selector generation advances by 2 for a general cell and by 0 for a migration-only one. One wave may not mix the two, because every cell after the first offsets from a single per-wave delta. Neither cell is a declared regional-rehome source, so its template carries no rehome trust lines. The source-membership guard now fires exactly when a roll expects those lines instead of for every US cell, which is the invariant it was standing in for, and which limits c17 and c18 to rehome protocol 0.

ELI5
Relay runs on a fleet of "cells". Most of them carry real user connections. Two of
them, c17 and c18, currently carry none at all: they are parked and take no new
work. That makes them the safest possible place to try a new cell image, because
if it goes wrong nobody gets disconnected.
The rollout workflow that upgrades a cell refused to touch them, and would have
quietly turned them into live, connection-taking cells if it had. This teaches it
to roll a parked cell and hand it back parked.
What Changed
Before. A canary-apply on c17 failed at the dispatch gate with
same-cap wave cells are invalid, because the approved-cell list held only the nineteen servingcells. There was no way to roll a new image on a cell with zero hosts.
After. c17 and c18 are dispatchable. A wave on either one isolates nothing,
drains nothing, replaces the VM, and returns the cell to migration-only.
The mechanism is a cell's entry admission class, which the wave now carries
end to end instead of assuming every target is a general serving cell:
separately so the rest of the wave can ask which class a cell is.
general. It now demands the class thecell is declared to serve in, so a parked cell passes and a serving cell is
still required to be pristine and general.
that it changed nothing, which is what proves the wave did not alter the cell's
class on the way in.
serving cell and wrong for a parked one, where it would have promoted c17 into
the general pool permanently. It now restores the entry class, using the
idempotent isolate for a parked cell, and verifies the cell ends in that class.
migration-only and into general. For a parked cell both halves of the wave now
see exactly the membership it entered with.
then activate); a parked cell's wave advances it by zero. That number lived in
three places, all hard-coded to 2: the sealed canary authority, the job's
per-wave offset, and the live preflight. All three now take it from the cell's
class. The preflight grew a
--selector-wave-deltaoption, defaulting to theold value of 2.
per-wave delta, so a wave holding both classes has no single correct offset.
The dispatch validator rejects a mixed wave before anything mutates.
so they get their own branch in the job's shape table. A census test now
cross-checks every approved cell's pinned cap against the committed Terraform
map, which nothing did before.
source. c17 and c18 are not, so their instance template carries no rehome trust
lines at all. That guard now fires exactly when either side of a roll expects
those lines, which is the invariant it was standing in for.
Why
The failing run tonight (35287474065) was a canary-apply on c17 that stopped at the
validator. Adding the two cells to the list alone would have shipped a much worse
bug: the wave would have run to completion and left c17 in general admission,
silently converting a parked cell into one that accepts connections at a 600 cap.
The alternative to the class-aware wave was a special case at the restore step
keyed on the cell id. That leaves the same assumption ("the target is general")
embedded in the precheck, the membership arithmetic, and three separate copies of
the
+2, each of which would have failed closed at a different point with anunhelpful message. Naming the class once and threading it is the same amount of
code and removes the assumption instead of papering over it.
The alternative to the protocol-conditioned rehome guard was adding c17 and c18 to
relay_region_rehome_source_cell_ids. That is a production topology change: italters their instance template, makes the director treat them as rehome sources,
and needs an apply of its own. It is also not required to canary an image. The
guard was over-broad, and narrowing it to the condition it actually protects is
the smaller and more honest change.
The limitation this leaves. c17 and c18 can roll only at regional-rehome
protocol
0. A canary on them proves an image boots, serves, and reports theright digest, cap, and heartbeat; it does not exercise rehome trust. If we want
that, the follow-up is to declare them rehome sources, which is a separate
reviewed apply.
Linked Issue
N/A - operational unblock for the same-cap rollout, no tracking issue.
Visual Proof
N/A. No UI. This changes a GitHub Actions rollout workflow and the scripts it runs.
Testing
All from
cloud/.pnpm test— 614 pass, 0 fail in the dev-script suite; 156 pass, 0 fail inpretest; per-package: relay-ops 134, relay 717 passed / 121 skipped, push 139passed / 4 skipped, postgres-schema 108, relay-contract 35, push-contract 30,
relay-fence-broker 16. No failures anywhere.
pnpm typecheck— clean across all 7 workspace projects.pnpm lint— clean.actionlinton both same-cap workflow files — only the pre-existing unknownblacksmith-2vcpu-ubuntu-2204runner label, which needs an actionlint configthis repo does not ship. shellcheck is installed locally, so actionlint ran it
over every changed
run:block and reported nothing.New coverage, all of it executing the real workflow text rather than a copy:
its membership derivation, and runs each under
bashfor both classes. Itasserts a parked cell's wave produces the entry membership on both sides and a
serving cell's still swaps the target between the two lists.
production.tfvars, and that exactly the migration-only cells are absent fromthe rehome source list.
the entry class, the isolate proves
changed == false, and the rehome guardsits after both protocols are resolved and reads both.
wave, sealing a canary at
+0versus+2, and the newcell-classcommand.Not verified, because it needs the live fleet: that c17 and c18 currently report
a 600 hard cap, a 60 unobserved bound, and rehome protocol 0 from their running
VMs. The job checks all three against the committed Terraform map and fails
closed on a mismatch, so a stale VM surfaces as a failed precheck rather than a
bad roll.
AI Disclosure
Review
Two things worth a reviewer's attention.
Merging this invalidates any in-flight canary authority. Both the wave
validator and the same-cap job workflow are in
TRUSTED_EVIDENCE_CODE_PATHS, soa canary sealed before this lands cannot authorize a batch after it. Re-run the
canary on the new commit.
A parked-cell canary can authorize a serving-cell batch, at a different rehome
protocol. The canary authority binds the image digests, run id, and rehome
control generation, but has never bound the per-roll rehome protocol. That is
pre-existing and, as far as I can tell, not a hole: the protocol is validated
per-cell against that cell's own template and live runtime in every batch job,
and the canary's role is evidence about the image. Flagging it because this
change makes a protocol-0-only cell reachable as a canary for the first time.
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
Security: no change to any identity, audience, lock, or confirmation. The break-glass
override path is untouched. The one guard that was relaxed (rehome source membership)
was redundant at protocol 0, because the plan validator independently rejects a
template that carries trust lines the roll did not ask for.
Backwards compatibility:
--selector-wave-deltadefaults to 2, so every existingcaller behaves exactly as before. The canary authority format is unchanged.
Cross-platform, SSH, mobile, performance: N/A. This is CI-only.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)