Repository navigation
Description
Context
PR #9168 introduced desktop-only (macOS) release blessing — a tag-based, evidence-backed gate before prod promotion. Current implementation:
| Component | Role |
|---|---|
desktop/macos/scripts/bless-release.sh |
Rebuilds tag in a worktree, runs T2 core E2E (desktop-core-harness.sh --tier 2), uploads evidence asset, writes blessed metadata to GitHub Release notes |
desktop/macos/scripts/release-keyvalue.py |
Parses/updates KEY_VALUE_START/KEY_VALUE_END block (blessed, blessedAt, blessedSha, blessedTier, blessedEvidence) |
.github/scripts/check-desktop-release-promotion.py |
Promotion gate: requires blessed: true, blessedSha, blessedAt; supports override_unblessed + I-ACCEPT-UNBLESSED-PROD-RISK escape hatch |
.github/workflows/desktop_promote_prod.yml |
Manual prod promotion workflow; blocks unless blessed (or override); verifies blessedSha matches tag commit |
web/admin/app/(protected)/dashboard/releases/page.tsx |
Admin Releases dashboard: single Blessed column for macOS releases |
desktop/macos/e2e/CORE_E2E.md |
T2 tier ladder: bless-eligible runs require provider_mode: offline, manifest passed: true, tier: 2 |
This issue tracks expanding that model to all deploy surfaces with per-surface evidence, independent blessing, and explicit dependency rules.
Problem / motivation
Today only macOS desktop beta releases can be blessed, and only desktop_promote_prod.yml enforces the gate. Other surfaces (Python backend services, Flutter mobile, desktop Rust backend as a distinct deploy unit) reach prod without a comparable evidence contract or admin visibility.
That creates two risks:
- Inconsistent confidence bar — desktop prod requires T2 hermetic E2E; backend prod deploy (
gcp_backend.yml) and mobile store submission do not. - Coupled surfaces can drift — desktop app, desktop Rust backend, and Python API evolve together; promoting one without the other's blessing can ship incompatible combinations.
We need a unified per-surface blessing model that is independently actionable but enforces coupling where runtime dependencies exist.
Goals
- Define a blessing surface registry (canonical list of blessable deploy units).
- Allow blessing one surface independently (e.g. bless Python backend at commit
abcwithout blessing Flutter). - Enforce dependency rules: if surface A depends on surface B, promoting/deploying A requires both A and B blessed at compatible SHAs.
- Per-surface evidence requirements — each bless run proves surface-specific criteria (not one-size-fits-all T2).
- Admin UI shows per-surface blessed status, not a single desktop-only column.
- Promotion/deploy gates per surface reuse the desktop override pattern (
override_unblessed+ typed confirmation). - Preserve backward compatibility with existing desktop
blessed*KEY_VALUE keys during migration.
Non-goals
- Replacing or automating David's approval for high-risk prod moves (blessing is necessary, not sufficient).
- Blessing firmware OTA in v1 of this expansion (can be a follow-up surface).
- Running all surface bless flows in a single monolithic CI job (surfaces have different machine/OS requirements).
- Defining exact implementation file layout or class names in this issue.
Proposed blessing surfaces
Each surface has: id, display_name, tag_pattern (or commit-only), evidence_tier, promotion_workflow(s), depends_on[].
| Surface ID | Display name | Tag / identity | Depends on | Promotion gate(s) |
|---|---|---|---|---|
desktop-macos |
macOS Desktop app | v*+BUILD-macos GitHub Release |
desktop-rust-backend, python-backend |
desktop_promote_prod.yml (existing) |
desktop-rust-backend |
Desktop Rust backend (Cloud Run) | Same tag as desktop-macos release or standalone deploy SHA | python-backend (if desktop API routes hit Python) |
desktop_promote_prod.yml (deploy step) |
python-backend |
Python backend (Cloud Run + GKE services) | Git tag v*-backend or commit SHA + release_version input |
(none — root dependency) | gcp_backend.yml (environment=prod) |
flutter-ios |
Flutter iOS app | App Store build number / v*+BUILD-ios tag (TBD) |
python-backend |
Manual store submission checklist + future workflow |
flutter-android |
Flutter Android app | Play build number / v*+BUILD-android tag (TBD) |
python-backend |
Manual store submission checklist + future workflow |
Note:
desktop-rust-backendis currently promoted insidedesktop_promote_prod.ymltied to the macOS tag. This issue should either (a) keep them co-blessed under one desktop release tag with separate surface metadata keys, or (b) split rust-backend blessing metadata while still requiring both for desktop prod promotion. Pick (a) or (b) in Phase 1 design — see Open questions.
Dependency graph rules
python-backend (root)
├── desktop-rust-backend
│ └── desktop-macos
├── flutter-ios
└── flutter-android
Rule 1 — App → Python backend (hard gate)
If a surface in depends_on includes python-backend, then promotion/deploy of that surface MUST fail unless:
python-backendis blessed, and- the blessed Python backend SHA is an ancestor of (or equal to) the app surface's blessed SHA, or a documented compatibility matrix says otherwise.
Reject if only the app is blessed but Python backend is not.
Reject if only Python backend is blessed but the app surface being promoted is not.
Rule 2 — Desktop stack coupling
desktop-macos promotion requires:
desktop-macosblessed (existing T2 evidence),desktop-rust-backendblessed (can share tag/SHA with macOS release today),python-backendblessed at a compatible SHA.
Rule 3 — Independent backend-only promotion
Blessing and deploying python-backend alone is valid (no app blessing required). This supports backend hotfixes and API-only rollouts.
Rule 4 — SHA alignment
Reuse desktop pattern: each surface stores blessedSha; promotion workflows verify blessed SHA matches the artifact being deployed. Mismatch fails unless override.
Rule 5 — Override escape hatch (reuse desktop pattern)
Every prod promotion workflow that checks blessing must accept:
override_unblessed: true(boolean input)override_confirm: I-ACCEPT-UNBLESSED-PROD-RISK(exact string)
Workflow emits ::warning:: to step summary when override is used.
Per-surface evidence requirements
What each bless invocation must prove before writing blessed: true for that surface.
desktop-macos (existing — keep as reference)
- Environment: macOS host,
PROVIDER_MODE=offlinedev-harness - Command:
bless-release.sh <v*+BUILD-macos>→desktop-core-harness.sh --tier 2 - Pass criteria:
manifest.jsonwithpassed: true,tier: 2,provider_mode: offline - Evidence artifact:
bless-evidence-<version>-<timestamp>.jsonuploaded to GitHub Release - Metadata keys:
blessed,blessedAt,blessedSha,blessedTier,blessedEvidence(existing)
desktop-rust-backend
- Environment: Linux CI or macOS; build from blessed tag SHA
- Pass criteria (minimum):
cargo test/ existing Rust CI green on SHA- Contract tests from
desktop-backend-contracts.ymlpass /healthreports expectedrelease_tag/release_shawhen deployed to staging (optional Phase 2)
- Evidence: JSON manifest with test run IDs, image digest, health probe result
- Storage: GitHub Release asset (if co-tagged with desktop) or dedicated blessing registry (see metadata model)
python-backend
- Environment: Linux; deploy to staging/dev or use hermetic harness
- Pass criteria (minimum):
backend/test.shunit suite green on SHA- Workflow contract tests in
backend/testing/workflow_contracts.jsongreen - OpenAPI contract check (
backend/scripts/openapi_runner.sh) green - Optional: smoke against staging Cloud Run
/health+ one synthetic per high-risk workflow
- Evidence: JSON manifest listing pytest summary, contract test results, staging health URL
- Storage: GitHub Release (
v*-backendtag) or commit-status / admin registry
flutter-ios / flutter-android
- Environment: macOS (iOS) / Linux or macOS (Android); device or emulator
- Pass criteria (minimum — to be refined with mobile team):
app/test.shgreen on SHA- Core E2E path: sign-in → capture/listen smoke → chat smoke (define mobile equivalent of desktop T2)
- Store-build compile succeeds (
flutter build ipa/flutter build appbundle)
- Evidence: JSON manifest + screenshot artifacts
- Storage: GitHub Release per platform tag or admin registry
Metadata model (proposed)
Extend beyond flat blessed* keys to per-surface namespacing while keeping desktop backward compat:
# Inside KEY_VALUE_START block (example)
channel: beta
isLive: true
# Legacy desktop keys (keep working)
blessed: true
blessedAt: 2026-07-06T12:00:00Z
blessedSha: abc123
blessedTier: 2
blessedEvidence: bless-evidence-11.0.0-20260706T120000Z.json
# New per-surface keys (pattern)
blessed.python-backend: true
blessed.python-backend.at: 2026-07-06T11:00:00Z
blessed.python-backend.sha: def456
blessed.python-backend.evidence: bless-evidence-backend-def456.json
blessed.python-backend.tier: contracts+unit
blessed.flutter-ios: falseAlternative: central blessing registry (Firestore doc or JSON in repo) keyed by (surface, sha). Issue implementer should pick one store; requirement is admin UI and promotion gates read the same source of truth.
Admin UI implications
Current: web/admin/.../releases/page.tsx shows macOS releases with a single Blessed column parsed from blessed KEY_VALUE.
Target:
- Per-surface columns or grouped badge row per release/commit (e.g. ✅ desktop / ✅ python-backend / ⬜ flutter-ios).
- Link each blessed badge to evidence asset URL (same pattern as
blessed_evidence_url). - Deploy readiness indicator: surface is "promotable" only when it and all
depends_onsurfaces are blessed at compatible SHAs. - Filter/sort: "show releases where desktop blessed but python-backend not" (common failure mode).
- API: extend
web/admin/app/api/omi/releases/route.ts(and/or new/api/omi/blessingsendpoint) to parse namespaced keys or registry.
Promotion gate behavior per surface
| Workflow | Surface gated | New checks to add |
|---|---|---|
desktop_promote_prod.yml |
desktop-macos, desktop-rust-backend |
Also require python-backend blessed at compatible SHA |
gcp_backend.yml |
python-backend |
Require python-backend blessed for environment=prod; override inputs |
| Mobile store submission (manual today) | flutter-ios, flutter-android |
Documented checklist + optional future mobile_promote_prod.yml |
desktop_backend_auto_dev.yml / auto-dev |
(none — dev only) | No blessing required |
Shared promotion validator library: generalize .github/scripts/check-desktop-release-promotion.py → check-release-promotion.py with --surface flag and dependency resolver.
Suggested implementation phases
Phase 1 — Model + Python backend
- Define surface registry (YAML or Python module) with
depends_ongraph. - Add
python-backendbless script + metadata writer. - Gate
gcp_backend.ymlprod deploy onpython-backendblessing. - Unit tests for dependency resolver (reject app-only / backend-only partial bless).
Phase 2 — Desktop dependency enforcement
- Update
desktop_promote_prod.ymlto requirepython-backendblessed at compatible SHA. - Split or namespaced metadata for
desktop-rust-backendif needed. - Extend admin API to expose
python-backendblessing status alongside desktop releases.
Phase 3 — Admin UI
- Per-surface blessed badges on Releases dashboard.
- Deploy-readiness column (all dependencies satisfied).
- Evidence links per surface.
Phase 4 — Flutter mobile
- Define mobile core E2E tier (analogous to
CORE_E2E.mdT2). bless-release-mobile.sh(or per-platform scripts).- Store submission gate / checklist integration.
Phase 5 — Consolidation
- Deprecate flat
blessed*keys in favor of namespaced keys (with migration shim). - Single
bless-surface.sh --surface <id> --ref <tag|sha>entrypoint wrapping per-surface scripts.
Acceptance criteria (for closing this issue's implementation)
- Each surface in the registry has a documented bless command, evidence schema, and promotion gate (or documented manual gate for app stores).
- Promoting
desktop-macosfails ifpython-backendis not blessed (unless override). - Promoting
desktop-macosfails if onlypython-backendis blessed but desktop is not (unless override). python-backendprod deploy can proceed with onlypython-backendblessed.- Admin dashboard shows per-surface blessing status for at least desktop + python-backend.
- Override pattern works on every new gate (warning logged, exact confirm string required).
- Tests cover dependency resolver happy path and rejection cases.
Open questions
- Metadata store: Per-release KEY_VALUE namespacing vs central Firestore/registry vs GitHub commit statuses?
- Python backend tagging: Do we introduce
v*-backendGitHub Releases, or bless by commit SHA only? - Desktop Rust backend: Separate surface metadata from macOS app, or always co-blessed under one tag?
- Compatible SHA definition: Strict ancestor check vs explicit
compatibleBackendShafield on app blessing metadata? - Flutter release identity: App Store build number, Git tag, or TestFlight train ID as blessing key?
- Staging bless: Must python-backend bless hit staging deploy, or is hermetic CI sufficient for v1?
- GKE services: Does
python-backendsurface include pusher/parakeet/diarizer, or separate sub-surfaces? - Bless expiry: Should blessings age out (e.g. >7 days) and require re-bless?
References
- PR Desktop core E2E harness, tiered testing, and release blessing gate #9168 — desktop blessing implementation
desktop/macos/docs/agent-prod-promotion-runbook.md— desktop prod promotion processdesktop/macos/e2e/CORE_E2E.md— T2 bless tier definitionAGENTS.md— Definition of Done (behavior changed → test changed)
Activity
Register listen/pusher workflow contracts and wire CI ratchet.
ci(backend): wire listen/pusher workflow contracts (#9255)
Git-on-my-level commentedon Jul 21, 2026
Closing as superseded rather than deferred.
This proposed generalizing the
blessed: boolmodel (override_unblessed+I-ACCEPT-UNBLESSED-PROD-RISK) across all deploy surfaces. Since it was filed, the desktop control plane moved past that design:backend/database/desktop_update_channels.py—promote/rollback/emergency, whereemergencylegally skips the T2 qualification gate instead of requiring an operator to assert a falsequalification.passed.desktop_emergency_promote_beta.ymlis the operator-facing path for it, andAGENTS.mdnow documents a break-glass hatch per gated surface.Expanding the older boolean-blessing design across every deploy surface would spread a model desktop has already outgrown. If cross-surface release gating is wanted later, it should generalize the named-transition model, and should be filed fresh against that design.
One residual gap worth carrying forward, from the 2026-07-20 release control-plane audit: the emergency transition records no reason, operator, scope, or expiry on the pointer itself (
grep -n 'reason|actor|operator' backend/database/desktop_update_channels.pyreturns nothing). Attribution today lives outside the data model, in the Actions dispatch record and the release note. That is a narrower, better-scoped issue than this one, and worth filing separately if it matters.