Skip to content

Desktop Release V2: build once and promote one immutable app/backend release unit #9526

Closed

Description

@Git-on-my-level

Summary

Make a desktop release one immutable, qualified unit that is built once and promoted unchanged from candidate to beta to stable.

The unit must include both the signed macOS artifacts and, when the app requires a companion Rust backend change, the exact desktop-backend OCI digest. Stable promotion must never rebuild release code from a Git tag.

This is the foundation for the safe promotion engine and evidence gates tracked in the linked follow-ups.

Evidence from the v0.12.70 production release

Exact release identity:

  • tag: v0.12.70+12070-macos
  • app source: 2bdd18a7e397b4c7aab8199443def178c0e9b0e0
  • Omi.zip: sha256:5904314bb6a26a9466e0cfb4cce1cdc72aeaa556d26c959141b671b939acd0cc
  • omi.dmg: sha256:24db5a53c7c32db9a7b9e20a02b061171d7ccf7b6a7948ae633c03951075883a
  • Tier-2 evidence: qualification-evidence-0.12.70+12070-20260711T060737Z.json, 36/36 flows passed
  • evidence digest: sha256:cbf38fa79938bbd2bc869412e1674d1ee03e0afb88fbc6561475ffbe12cdc9b0

The app artifact was qualified and beta-visible before production, but beta did not exercise the Rust backend that stable would deploy. The stable workflow rebuilt desktop/macos/Backend-Rust from the tag during production promotion, then deployed:

  • OCI index: sha256:bd9c392794430c354cd6ca79d3faad5c22c1e8aab27d772cfe41cbd2183fcc83
  • Cloud Run child: sha256:8b42a3f9462c15d811a2ac10030abc5b9e2793f7af0d93a97676ee02b48526da
  • revision: desktop-backend-00884-wvg

This meant beta and stable were not promoting the same complete release unit. Backend buildability, environment semantics, Redis behavior and Cloud Run rollout behavior were first exercised during stable promotion.

A second identity seam was also visible: the service's generic commit-sha label did not equal the release source, while the image, /health payload and tracking tag did. Agents should not have to infer which field is authoritative.

The Python backend* services are independent and must not be included in this desktop release unit. This issue concerns only the signed macOS artifacts and the Rust desktop-backend.

Required release-manifest contract

Create one versioned immutable manifest at artifact-production time, before beta:

DesktopReleaseManifest {
  schema_version
  release_id
  platform
  version
  build_number
  app_source_sha
  zip_url
  zip_sha256
  dmg_url
  dmg_sha256
  ed_signature
  qualification_evidence_asset
  qualification_evidence_sha256
  qualification_tier
  qualification_passed
  backend_mode: app_only | backend_required
  desktop_backend_source_sha?
  desktop_backend_oci_index_digest?
  desktop_backend_platform_digest?
  compatibility_contract
  environment_contract_version
  created_at
}

Requirements:

  • Build the macOS ZIP/DMG and Rust backend image once from the same approved source/tag context.
  • Push the backend by immutable digest during candidate preparation, not stable promotion.
  • Record both OCI index and deployed platform-child digest.
  • Sign or otherwise make manifest mutation detectable.
  • Store the manifest once; beta and stable pointers reference its immutable release ID.
  • Define whether the release is app_only or backend_required.
  • For backend_required, define supported app/backend combinations and make beta exercise the exact intended backend digest.
  • For app_only, stable app promotion must not rebuild or redeploy desktop-backend.
  • Stamp release-id, release-source-sha, release-manifest-digest and image-digest labels; do not reuse generic commit-sha as release identity.
  • Keep desktop-backend-prod-deployed as a projection of the manifest, not a separate source of truth.

Rollout plan

  1. Define and test the schema and compatibility rules without changing live promotion.
  2. Produce manifests in shadow mode for several tags and compare them with current GitHub/Firestore/artifact state.
  3. Build and publish the Rust image during candidate/qualification CI.
  4. Teach beta to deploy or select the manifest-pinned backend digest.
  5. Require one beta cycle with the new manifest before stable consumes it.
  6. Remove backend build steps from the stable workflow only after the shadow and beta comparisons are exact.

Do not migrate by allowing both an implicit tag rebuild and a manifest digest to be accepted indefinitely. The manifest becomes authoritative before the old path is deleted.

Acceptance criteria

  • A released app and required Rust backend are built exactly once.
  • Beta and stable use the same manifest and backend digest.
  • Stable performs no source build.
  • App-only releases perform no backend deployment.
  • Compatibility mismatch fails before any traffic or channel mutation.
  • Manifest tampering or digest drift fails closed.
  • OCI index and platform-child digest are both verified.
  • Source labels, /health, image digest and tracking tag agree.
  • Python backend deployment identity is not read or mutated by this workflow.
  • Contract tests cover an app-only release, a backend-required release, digest mismatch and incompatible app/backend versions.
  • Migration documentation names the old sources of truth and their deletion conditions.

Non-goals

  • Rebuilding or replacing already published app artifacts.
  • Coupling Python backend deployment to desktop release promotion.
  • Implementing the full promotion state machine in this issue.

Related issue pack

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

Activity

  1. added
    enhancement
    maintainer
    p1
    workflow-review
    on Jul 12, 2026
  2. Git-on-my-level commented on Jul 22, 2026

    @Git-on-my-level
    MemberAuthor

    Done: implemented by .github/scripts/desktop_release_manifest.py, which requires exactly the specified contract fields (backend_mode, desktop_backend_oci_index_digest, qualification_tier/qualification_passed) and is consumed by desktop_promote_beta.yml and desktop_promote_prod.yml.

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

    desktopenhancementmacOSmaintainerp1stabilityworkflow-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions