Repository navigation
fix(relay): deploy driver builds the checked commit, prompts on their own line, summarises progress - #25755
Conversation
…et the deploy driver The publish workflow builds main's head at dispatch. The driver checked main at preflight but dispatched the publish about four minutes later, after the inspects and the typed phrase, so a busy main stopped the first real deploy. It now dispatches the publish seconds after the check, before anything else, and a build of a moved main stops with the --commit/--publish-run command that deploys it once reviewed. Typed prompts end in a newline, and runs are summarised (status changes plus every 5 min) instead of streaming gh run watch.
|
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 configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe deployment driver now publishes before it reads director state and requests operator confirmation. Before publishing, it checks that no non-exempt Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No deployment-blocking issue is established; the change is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Publishing now occurs before deployment confirmation, but serving changes remain behind commit, digest, inspection and ownership checks. No introduced security vulnerability was established. Production approval rules and credential permissions were unavailable, so the assessment remains qualified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 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 |
… build The generic re-run line named the reviewed commit without --publish-run, which would only build the moved main again.

ELI5
The script that deploys the relay director checked "is
mainstill the commit I reviewed?" and then waited about four minutes before asking GitHub to buildmain.mainchanges about six times an hour, so on its first real use (2026-10-05) it built a different commit and, correctly, refused to deploy it. This PR makes the script build right after that check. It also fixes two things that made the run hard to follow.What Changed
main, ran two read-only inspections, waited for the operator to typeDEPLOY …, and only then started the image build. The build workflow takes no commit input; it always builds whatevermainis at that moment. After: the driver starts the build a few seconds after checkingmain, before the inspections and the typed phrase. It still checks that the build is the reviewed commit and that the registry digest matches the build log. Ifmainmoves in those few seconds, the driver stops before touching rehome or the director. It then prints--commit <built commit> --publish-run <run>, which deploys that exact build once someone has reviewed it, without building again. A stop later in the run (for example, rehome found paused) already prints a re-run command that reuses the build.Type PAUSE_REGIONAL_REHOMING to continue:had no trailing newline, and the operator noticed it about five minutes late. After: the prompt ends with a newline.gh run watchoutput, which flooded the terminal. After: it polls the run every 10 s and logs one line when the status changes, plus one every 5 minutes, for examplemonitor: in_progress, 5 min. It still logs one line when the run finishes.cloud/docs/relay-workflows.mdnow lists publish first.Why
The simplest fix would be to build an explicit commit. The publish workflow (
cloud-publish-relay-production.yml) has no commit input, though. It always builds the head of the ref it is dispatched on. Adding that input would change an audited production workflow and its image-tag logic. Building first closes the gap with a driver-only change. Building first is safe because the build only pushes an immutablerelay:sha-<commit>tag; nothing serving changes until the operator typesDEPLOY. The "reuse this run" path (--publish-run) already existed and already checks the run's commit. This PR makes the stop message tell the operator to use it.Trade-off: the build now starts before the operator types
DEPLOY. A run that stops in preflight leaves an unused image, but the printed re-run command reuses it.Linked Issue
N/A. These are follow-ups from the driver's first production use (#25642), recorded in the 2026-10-05 ops log.
Visual Proof
N/A. This is an operator command-line script with no UI.
Testing
cd cloud && node --test dev/scripts/drive-relay-director-deploy.test.mjs: 32 pass. New tests:mainmoving during the inspections and the typed phrase (the 22:59Z case) no longer stops the deploy.mainmoving between the check and the build stops with nothing else dispatched, and the printed--commit … --publish-run …finishes without a second build.I checked that the tests catch the bug: with the early build removed, the new race tests fail. No workflow was dispatched.
Review
Merge timing: this touches
cloud/evidence code, so it must merge between rolls, not while a relay rollout is in flight.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
Operator-only Node script on the operator's machine. It runs no differently over SSH, on mobile, or across platforms.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)