Skip to content

epic(shorebird): make emergency patches independent of main #7841

Closed
10 of 14 issues completed
Closed

Description

@NotThatKindOfDrLiz

Overview

Make Shorebird a dependable emergency recovery path for publicly distributed iOS and Android releases without freezing main or shipping every Dart change merged since the release.

The current Codemagic patch workflow requires main and rejects a patch after any blocked path lands. The new operating model uses a release-specific patch line rooted at immutable release provenance, with minimal reviewed backports, staging validation, and explicit stable promotion.

This epic is the source of truth for the policy, implementation, operational drill, decisions, and completion status. Keep its child checklist current as work lands.

Goals

  • Build emergency patches from the exact provenance-recorded release baseline.
  • Keep normal development on main moving after a store release.
  • Ship only the minimal reviewed Dart fix plus any previously active fixes for that release.
  • Preserve signing, provenance, configuration matching, staging, explicit promotion, and rollback protections.
  • Prove the runbook on staged iOS and Android releases before relying on it in production.

Scope and decisions

  • Shorebird remains an emergency repair mechanism, not a normal feature-delivery channel.
  • Product fixes land on main first. Release patch lines contain reviewed backports and are never merged back into main.
  • Each newer patch for a release must preserve all fixes in the currently active patch because only one patch is active at a time.
  • Native, engine, plugin-native, bundled-asset, and broad dependency changes require a store release.
  • The first implementation retains the conservative pubspec guard; precise pure-Dart dependency support is deferred until there is a demonstrated need.
  • Store release builds continue to use shorebird release. Zapstore APKs and macOS remain outside the current patch path.

Child work

Child issues are linked through GitHub sub-issues and are the authoritative completion checklist.

Success criteria

  • The workflow accepts only an intentional release patch branch descended from the recorded baseline.
  • An advanced main, including later native or asset changes, cannot contaminate or prevent an isolated release backport.
  • The runbook defines eligibility, authorship/review, cumulative patches, validation, promotion, monitoring, rollback, and retirement.
  • Automated tests pin all safety properties.
  • A staged two-platform drill demonstrates first patch, cumulative second patch, and rollback.

Existing related work

These remain independent and do not block this epic unless the drill exposes a direct dependency.

Activity

  1. NotThatKindOfDrLiz commented on Aug 19, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Status — 2026-08-18

    The epic remains the rollout source of truth; do not close it when #7844 merges.

  2. NotThatKindOfDrLiz commented on Aug 19, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Status — 2026-08-19 (afternoon)

    #7844 merged as 4aaca98a54. The remaining child, #7843, is now in progress on iOS and blocked on Android.

    iOS

    The patch line shorebird-patch/ios/1.0.21+851 exists, is pushed, and validates. Full evidence in #7843. The epic's central success criterion — "An advanced main, including later native or asset changes, cannot contaminate or prevent an isolated release backport" — is now demonstrated against the real repository rather than fixtures: main sits 18 commits past the recorded baseline, the isolated backport validates, and main itself is rejected as a patch source.

    Remaining on iOS is the part static checks cannot cover: run ios-patch, install, verify on device, add a cumulative second patch, roll back.

    Android

    Blocked, and worth recording as a real gap rather than a scheduling detail: divinevideo/divine-release-provenance contains only releases/ios/. All three Android Shorebird releases (1.0.20+714, +716, +719) predate automatic provenance and therefore fail closed exactly as designed. An Android store release with a recorded baseline has to exist before Android is patchable at all — the workflow is correct today but has never had a valid input.

    That also means the epic cannot close on iOS evidence alone; the success criteria name both platforms.

    Runbook corrections

    Two gaps found while preparing the line, both in #7917: a fresh patch worktree fails the pre-push analyzer for a missing .dart_tool rather than anything in the backport, and the patch-source validator is deliberately absent from lines whose baseline predates #7844.

    Separately, #7918 records the internal TestFlight tester groups in the runbook. Not part of this epic, but adjacent release-operations wiring that #7801 left invisible from the repo.

    The epic stays open as the rollout source of truth.

  3. NotThatKindOfDrLiz commented on Aug 20, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Status — 2026-08-20: the goal is production hot-fix, and production is not yet patchable

    Recording the clarified objective, because it reorders the remaining work.

    The point of this epic is not the drill. It is to fully integrate Shorebird and ship a Shorebird-built release through App Store review, so that a live production build can be hot-fixed without a second review cycle. The drill is the gate before committing to that submission.

    Production is currently not patchable at all

    The live App Store build is 1.0.21+849, recorded patchable: false. It predates automatic provenance and its historical dart-defines cannot be reconstructed, so the workflow fails closed on it — correctly.

    1.0.21+850 and +851 are patchable: true but TestFlight-only, and the 1.0.21 App Store train is closed: ios_store_version_preflight.rb requires a strictly greater marketing version than the approved one, so the next store build must be 1.0.22. mobile/pubspec.yaml still reads 1.0.21+820 and would fail that preflight today.

    So the capability this epic exists to deliver does not apply to any shipping build yet. It begins with #7980.

    The safety gate is missing, and must ship with the capability

    Shorebird replaces App Store review with a validate-then-promote sequence. On iOS the validate step is currently impossible: shorebird preview cannot install an app_store-signed artifact (0xe800801f, profile has beta-reports-active and no ProvisionedDevices), and an installed build only polls stable. Full evidence on #7843.

    That means a hot-fix today would go straight to production users with neither review nor prior confirmation the patch applies. #7979 closes it, and belongs in the submission binary rather than after it — otherwise the first real incident is promote-and-pray.

    Progress since the last update

    Remaining, in order

    1. task: prove the Shorebird release-backport runbook on iOS and Android #7843 — finish the iOS drill on 1.0.21+851 (first patch, cumulative second, rollback). Safe now because no App Store user runs 851.
    2. task: add a staging-track patch validation affordance to developer options #7979 — staging-track validation affordance.
    3. task(shorebird): update App Store privacy disclosures #7980 — bump to 1.0.22, cut the release carrying task: add a staging-track patch validation affordance to developer options #7979, ship it through review. This is the release that makes production hot-fixable.
    4. Android — still blocked on any provenance-recorded release; divinevideo/divine-release-provenance has no releases/android/. Unlike iOS, Android can use shorebird preview normally once one exists.

    The epic closes when a shipping App Store build is patchable and a patch against it has been validated without touching production — not when the drill passes.

  4. NotThatKindOfDrLiz commented on Aug 21, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Correction: Android is no longer blocked

    Earlier status said Android was blocked on the absence of any provenance-recorded release. That is resolved.

    1.0.22+739 is published, and divinevideo/divine-release-provenance now has releases/android/1.0.22+739.json with patchable: true — the first Android record in the repository. Getting there required #7987 / #7988: Shorebird's bundled Flutter precaches only host artifacts, so shorebird release android had been failing on a missing flutter.jar, and shorebird_install rm -rfs ~/.shorebird on any pin change, discarding what the old 1.0.20 Android releases had.

    The 1.0.22 train is also open now (#7981), which is the version #7980 needs.

    The remaining Android blocker is different and smaller: the release was cut from main's tip, so there is nothing to backport onto its patch line yet. Details on #7843.

    Revised state:

    Item Status
    #7842 done
    #7937 done — patch signing had never worked
    #7987 done — Android release builds had never worked
    #7843 iOS half done — first patch, cumulative patch, rollback all verified on device
    #7843 Android half waiting on a post-baseline Dart-only fix to backport
    #7979 not started — staging-track validation affordance
    #7980 not started — first patchable App Store release

    Three separate things that had never been exercised turned out to be broken, each invisible to static tests because the path had never run. That is the drill's actual return so far, ahead of any of its stated criteria.

  5. NotThatKindOfDrLiz commented on Aug 21, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Status — 2026-08-21: drill complete; production releases remain

    The two-platform manual drill in #7843 is complete. Liz confirmed that the iOS and Android first patch, cumulative second patch, and rollback checks all passed. #7843 is closed.

    #7979 is also complete via #7995, so the staging-track validation affordance required for a safe shipping iOS release is now on main. The 1.0.22 release train is already open via #7981.

    Remaining critical path

    Item Status
    #7980 ready — cut the Shorebird-built iOS release, validate the staged patch from TestFlight, and take the same binary through App Store review
    #8037 ready — promote a patchable Shorebird Android artifact through Play validation and production rollout

    The epic remains open until patchable Shorebird-built releases are shipping on both stores and their provenance records are confirmed patchable: true.

  6. changed the title [-]epic: make Shorebird emergency patches independent of main[/-] [+]epic(shorebird): make emergency patches independent of main[/+] on Aug 29, 2026
  7. NotThatKindOfDrLiz commented on Oct 4, 2026

    @NotThatKindOfDrLiz
    MemberAuthor

    Closing as completed based on Liz’s confirmation in this session that the Shorebird-built store artifacts are live on both platforms. The two-platform patch drill was confirmed complete in #7843. Exact production build numbers were not provided in this session; the provenance versions checked during review are not being asserted as the live store versions. Remaining privacy-disclosure work continues in #7980 and #8850.

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

Metadata

Metadata

Labels

epicEpic - Section grouping

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions