Skip to content

Expand release blessing system to all deploy surfaces #9194

Closed as not planned

Description

@Git-on-my-level

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:

  1. Inconsistent confidence bar — desktop prod requires T2 hermetic E2E; backend prod deploy (gcp_backend.yml) and mobile store submission do not.
  2. 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 abc without 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-backend is currently promoted inside desktop_promote_prod.yml tied 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-backend is 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-macos blessed (existing T2 evidence),
  • desktop-rust-backend blessed (can share tag/SHA with macOS release today),
  • python-backend blessed 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=offline dev-harness
  • Command: bless-release.sh <v*+BUILD-macos> → desktop-core-harness.sh --tier 2
  • Pass criteria: manifest.json with passed: true, tier: 2, provider_mode: offline
  • Evidence artifact: bless-evidence-<version>-<timestamp>.json uploaded 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.yml pass
    • /health reports expected release_tag / release_sha when 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.sh unit suite green on SHA
    • Workflow contract tests in backend/testing/workflow_contracts.json green
    • 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*-backend tag) 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.sh green 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: false

Alternative: 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_on surfaces 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/blessings endpoint) 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_on graph.
  • Add python-backend bless script + metadata writer.
  • Gate gcp_backend.yml prod deploy on python-backend blessing.
  • Unit tests for dependency resolver (reject app-only / backend-only partial bless).

Phase 2 — Desktop dependency enforcement

  • Update desktop_promote_prod.yml to require python-backend blessed at compatible SHA.
  • Split or namespaced metadata for desktop-rust-backend if needed.
  • Extend admin API to expose python-backend blessing 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.md T2).
  • 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)

  1. Each surface in the registry has a documented bless command, evidence schema, and promotion gate (or documented manual gate for app stores).
  2. Promoting desktop-macos fails if python-backend is not blessed (unless override).
  3. Promoting desktop-macos fails if only python-backend is blessed but desktop is not (unless override).
  4. python-backend prod deploy can proceed with only python-backend blessed.
  5. Admin dashboard shows per-surface blessing status for at least desktop + python-backend.
  6. Override pattern works on every new gate (warning logged, exact confirm string required).
  7. Tests cover dependency resolver happy path and rejection cases.

Open questions

  1. Metadata store: Per-release KEY_VALUE namespacing vs central Firestore/registry vs GitHub commit statuses?
  2. Python backend tagging: Do we introduce v*-backend GitHub Releases, or bless by commit SHA only?
  3. Desktop Rust backend: Separate surface metadata from macOS app, or always co-blessed under one tag?
  4. Compatible SHA definition: Strict ancestor check vs explicit compatibleBackendSha field on app blessing metadata?
  5. Flutter release identity: App Store build number, Git tag, or TestFlight train ID as blessing key?
  6. Staging bless: Must python-backend bless hit staging deploy, or is hermetic CI sufficient for v1?
  7. GKE services: Does python-backend surface include pusher/parakeet/diarizer, or separate sub-surfaces?
  8. Bless expiry: Should blessings age out (e.g. >7 days) and require re-bless?

References

Activity

  1. added
    enhancement
    flutter
    backend
    maintainer
    on Jul 7, 2026
  2. Git-on-my-level commented on Jul 21, 2026

    @Git-on-my-level
    MemberAuthor

    Closing as superseded rather than deferred.

    This proposed generalizing the blessed: bool model (override_unblessed + I-ACCEPT-UNBLESSED-PROD-RISK) across all deploy surfaces. Since it was filed, the desktop control plane moved past that design:

    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.py returns 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backenddesktopenhancementfluttermaintainerstability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions