Repository navigation
Description
Summary
Replace the current loosely coupled beta, nomination and stable workflows with a resumable, fail-closed promotion engine.
The engine must consume an immutable desktop release manifest, deploy a Rust backend candidate at zero traffic when required, prove semantic health, shift traffic explicitly with automatic rollback, and only then cross the roll-forward-only stable-channel boundary.
Evidence from v0.12.70
Nomination failed because a release ID was interpolated into a URL
Canonical beta run 29174822729 successfully created:
- manifest
desktop_release_manifests/v0.12.70+12070-macos macos-betageneration 1 pointing to the exact manifest
Nomination run 29174914736 then failed before mutation with curl exit 22. The workflow constructed:
.../desktop_release_manifests/$RELEASE_TAG
using raw v0.12.70+12070-macos. The REST path decoded + as a space and requested v0.12.70 12070-macos, which correctly returned 404. The exact URL-encoded document returned 200.
The release was unblocked by running the repository's own nomination validator against the encoded exact manifest/pointer, applying only the intended metadata edit, then proving the normal non-break-glass stable checker passed. Future operators must not need this manual recovery.
The deploy action moved traffic before the explicit traffic step
Stable run 29175012320 completed successfully, but its actual boundaries were:
- backend deploy:
01:22:08Z-01:22:34Z - explicit traffic reconciliation:
01:22:34Z-01:22:46Z - health identity:
01:22:46Z-01:22:47Z - legacy Firestore stable promotion:
01:22:47Z-01:22:49Z - canonical stable pointer:
01:22:49Z-01:22:51Z - GitHub metadata:
01:22:51Z-01:22:52Z - cache clear:
01:22:52Z-01:22:53Z - tracking tag:
01:22:53Z-01:22:54Z
The Cloud Run deploy action shifted traffic while the step named Route traffic... was still pending. There was no zero-traffic candidate and no automatic rollback. Before the legacy Firestore PATCH, desktop-backend-00883-tcp and stable .0 were the last simple rollback boundary. After that PATCH, recovery was roll-forward-only.
Finalization left contradictory human metadata
The beta and stable metadata scripts preserved an obsolete waiver saying stable remains blocked pending QA after machine metadata had become stable. It required a separate metadata-only repair.
Target state machine
Implement one per-release state record:
prepared
-> qualified
-> beta_candidate_ready
-> beta_live
-> soak_accepted
-> nominated
-> prod_candidate_ready
-> prod_backend_live
-> stable_pointer_live
-> finalized
Each transition must be:
- idempotent;
- lease-protected per environment/service;
- tied to one release ID and immutable manifest digest;
- independently observable;
- resumable after runner death;
- explicit about whether it is reversible or roll-forward-only.
Required changes
Safe data access
- Replace hand-built Firestore REST document URLs with a typed client or one central path encoder.
- Test tags containing
+, spaces and other reserved characters. - Read back the exact manifest/pointer identity immediately before mutation.
- Use update preconditions/generations so stale operators cannot overwrite newer pointers.
Candidate-first backend rollout
For backend_required manifests:
- Create a Cloud Run revision from the immutable platform digest with no traffic.
- Verify revision source, manifest digest, environment contract, secrets and resource settings.
- Activate under a temporary tag or protected validation route.
- Exercise semantic probes:
- exact
/healthrelease identity; - appcast/update-feed generation;
- authenticated TTS through Redis rate limiting;
- forced Redis reconnect probe;
- representative Gemini/chat proxy control;
- OAuth callback/base URL and Calendar-key dependency readiness.
- exact
- Remove validation tags.
- Snapshot current spec/status traffic.
- Shift explicitly and require both surfaces to converge.
- Hold a bounded dwell and automatically restore the snapshot on failure.
The deployment action must not shift traffic before the explicit promotion step.
Stable-channel commit and finalizer
- Treat legacy stable mutation and canonical stable pointer as the documented roll-forward-only boundary.
- Before that boundary, automatically roll back backend traffic on failed acceptance.
- After it, rerun idempotent remaining steps rather than attempt to move stable backward.
- Finalizer must reconcile:
- canonical beta/stable pointers;
- legacy release bridge;
- GitHub machine metadata;
- human-readable qualification/waiver prose;
- static downloads;
- Python and Rust appcasts;
- cache invalidation;
- tracking tag.
- Report incomplete finalization as a first-class state with a paste-ready resume command.
Workflow hygiene
- Upgrade actions still relying on the Node 20 compatibility override.
- Separate Python backend, Rust desktop backend and release-control concurrency groups.
- A branch name must never silently select a production source; use immutable release inputs.
- Preserve first-failure evidence and exact rollback instructions in the run summary.
Rollout plan
- Land the URL-encoding regression fix independently.
- Implement plan/read-only mode against current workflows.
- Add state records and leases while old workflows remain authoritative.
- Run candidate creation and semantic probes without traffic.
- Make the engine authoritative for beta.
- Complete one beta cycle.
- Enable backend traffic promotion with automatic rollback.
- Enable stable pointer mutation last.
- Delete the superseded workflow paths.
Acceptance criteria
-
v0.12.70+12070-macosand other reserved-character IDs pass workflow tests. - Re-running any phase is idempotent.
- Two operators cannot promote competing desktop releases.
- Candidate creation changes no live traffic.
- Semantic probes run against the exact candidate.
- Deploy action cannot move traffic implicitly.
- Forward and rollback traffic converge in spec and status.
- Failure before stable mutation restores the exact snapshot automatically.
- Failure after stable mutation produces a deterministic roll-forward resume.
- Human and machine release metadata converge without manual editing.
- App-only releases skip backend phases.
- Hard cancellation leaves a detectable/recoverable lease and state.
- Run summary contains exact manifest, digest, revision, pointer generations, boundary crossed and recovery action.
Related issue pack
- Desktop Release V2: build once and promote one immutable app/backend release unit #9526 — immutable app/backend release unit and compatibility contract (foundation)
- Desktop Release V2: safe resumable beta/stable promotion engine with candidate-first rollback #9525 — resumable candidate-first promotion and rollback engine
- Desktop Release V2: generated evidence, release doctor, and enforceable beta-to-stable drift gates #9523 — generated evidence, release doctor, and beta-to-stable drift gates
- Desktop backend: recover stale Redis connections and isolate Gemini timeout failures from release health #9524 — Redis recovery and Gemini timeout isolation for desktop-backend health
Dependency graph
#9526 ──> #9525 ──> blocking phase-aware gates in #9523
└────────────────> canonical identity checks in #9523
#9524 ── independent implementation lane
├────────────────> semantic runtime probes consumed by #9525
└────────────────> bounded runtime telemetry consumed by #9523
Dependencies and rollout ordering
- Blocked by Desktop Release V2: build once and promote one immutable app/backend release unit #9526 for the durable design: the engine must promote an immutable manifest/digest, not rebuild or infer a release unit.
- Immediate exception: the Firestore
+URL-encoding bug and safer input encoding can land independently as a small defensive fix before Desktop Release V2: build once and promote one immutable app/backend release unit #9526. - Blocks part of Desktop Release V2: generated evidence, release doctor, and enforceable beta-to-stable drift gates #9523: phase-aware blocking gates and final evidence need the promotion engine's durable state records and terminal outcomes.
- Consumes Desktop backend: recover stale Redis connections and isolate Gemini timeout failures from release health #9524 but is not wholly blocked by it: candidate creation, leases, resumption, rollback, and finalizers can ship first. Do not enable Redis/TTS/Gemini runtime probes as hard promotion gates until Desktop backend: recover stale Redis connections and isolate Gemini timeout failures from release health #9524 supplies stable classifications and semantics.
- Recommended landing order: encoding fix; consume Desktop Release V2: build once and promote one immutable app/backend release unit #9526 manifest; add candidate-first deployment with zero stable traffic; add resumability/rollback; integrate Desktop backend: recover stale Redis connections and isolate Gemini timeout failures from release health #9524 probes; then allow Desktop Release V2: generated evidence, release doctor, and enforceable beta-to-stable drift gates #9523 to turn the corresponding advisory checks into blocking gates.
Activity
Git-on-my-level commentedon Sep 8, 2026
Closing as superseded. The couplings this engine was designed to make safe were removed rather than wrapped: desktop_nominate_stable_candidate.yml and its +-URL bug were deleted (7a6bac1), the Rust cloud backend was replaced (#10686), and desktop_promote_prod.yml is now a 272-line pointer move that never invokes a backend deployment (desktop-updates.mdx: Stable is a protected distribution pointer). Candidate-first zero-traffic rollout with automatic traffic restore lives in gcp_backend.yml. Exposure shape and reverse gear are owned by omi-knowledge-base projects/staged-rollouts. The unbuilt durable state-record/lease sub-item can be re-filed on its own if needed.