Skip to content

ci: collapse desktop beta to signed-smoke plus hourly freshness - #11588

Merged
Git-on-my-level merged 4 commits into
mainfrom
ci/simplify-beta-release
Aug 15, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
ci/simplify-beta-release

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Desktop Beta now ships from the hourly signed-candidate train: logic tests (Release Eligibility + Desktop Swift CI) plus Codemagic signed-smoke dogfooding. Qualification is gone from the release path — no lite replacement.

Pipeline afterwards

  1. Hourly desktop_auto_release.yml (7 * * * *, plus workflow_dispatch) runs one Ubuntu job plan-and-tag.
  2. The planner evaluates the newest releasable main SHA in a single pass (ready / defer / blocked). A defer after changelog merge exits 0; the next hourly tick tags, and changelog reuse makes it idempotent.
  3. On ready, it consolidates changelog, publishes an immutable v*-macos tag, and waits up to 10 minutes for Codemagic tag intake.
  4. Codemagic builds, signed-smokes, and promotes Beta as today.
  5. Hourly desktop_release_doctor.yml (23 * * * *) keeps proactive-health and adds beta-freshness, which also maintains one durable GitHub issue titled Desktop beta freshness alarm.

Dispatch entry point for promotion retry remains desktop_recover_beta.yml (desktop_promote_beta.yml is still workflow_call-only).

Source gate (three outcomes)

Required checks, each mapped to a producer workflow:

  • Release Eligibility → .github/workflows/release-eligibility.yml
  • Desktop Swift Build & Tests → .github/workflows/desktop-swift-ci.yml
  • Desktop Swift Release Compile → .github/workflows/desktop-swift-ci.yml

ready — all three completed+success on exact SHA S.

defer (exit 0 + ::warning) — a required check or its producing run is queued/in_progress, or the commit is ≤10 minutes old and the check has not appeared yet.

Example:

::warning::required check Desktop Swift Build & Tests for exact source SHA abcdef012345 is in_progress

blocked (exit 1 + ::error, unless a newer-green fallback SHA exists). Producer disabled:

::error::producer workflow .github/workflows/release-eligibility.yml is disabled; fix with `gh workflow enable .github/workflows/release-eligibility.yml` then re-mint evidence: gh api repos/BasedHardware/omi/git/refs -f ref=refs/heads/ci-evidence/<S> -f sha=<S> && gh workflow run .github/workflows/release-eligibility.yml --ref ci-evidence/<S> (delete the branch after the run completes)

Completed non-success (no fallback):

::error::required check Desktop Swift Build & Tests for exact source SHA <S> completed with failure: https://github.com/BasedHardware/omi/runs/<id>

Missing check after the producer completed:

::error::required check Release Eligibility is missing for exact source SHA <S> after producing workflow .github/workflows/release-eligibility.yml completed (<url>); fix: gh run rerun <run-id>

Push event never arrived (commit age >10 min, no run, no fallback):

::error::required check Release Eligibility cannot exist for exact source SHA <S>: push events do not replay. Mint evidence with: gh api repos/BasedHardware/omi/git/refs -f ref=refs/heads/ci-evidence/<S> -f sha=<S> && gh workflow run .github/workflows/release-eligibility.yml --ref ci-evidence/<S> (delete the branch after the run completes)

If a newest-green fallback SHA exists, the planner emits ::warning and tags that tree instead of exiting 1.

Release Eligibility now has workflow_dispatch (same absence class as Desktop Swift CI) so the mint recipe can actually run.

Freshness alarm

Job beta-freshness on the existing hourly doctor workflow. Stdlib-only .github/scripts/check-desktop-beta-freshness.py (GH_TOKEN + unauthenticated HTTPS).

  1. Promotion lag — candidate_build (highest v*-macos tag) > live_beta_build (newest sparkle:version in https://api.omi.me/v2/desktop/appcast.xml?identity=beta) AND the tag commit is older than 10800s (3h). Diagnosis comes from that tag SHA's Release OMI Desktop (Swift) check: failure → re-run Codemagic or dispatch Desktop Release Recovery Required; success → dispatch Retry Desktop Beta Promotion (desktop_recover_beta.yml) with release_tag=<tag>; absent → dispatch Build Desktop Release Candidate.
  2. Wedged train — newest first-parent main commit touching releasable desktop paths is older than 21600s (6h) and is not an ancestor of the newest v*-macos tag. Points at the latest Build Desktop Release Candidate run.

The job goes red and upserts one durable issue; a healthy run closes it with a Recovered comment.

Behavior changes

  • Breakglass rollback: previously required qualification_tier == "T2" and qualification_passed is True. Every recent live manifest is signed-smoke / False, so rollback was already impossible. Rollback now rejects only qualification_tier == "emergency".
  • Admin dashboard: lifecycle is candidate → beta_live → stable (plus nomination stable_candidate). beta_live means the tag equals the newest item in the public beta appcast (fetched server-side). DesktopQualification, desktopQualificationFromMetadata, qualified_beta, and qualified_* response fields are gone. Stable nomination no longer requires stableCandidateQualificationEvidence. The "Qualified beta" state is gone.
  • Frozen v1 manifest fields: qualification_tier / qualification_passed stay. Comments annotate them as legacy evidence-class fields; 'signed-smoke' is the only tier new manifests carry. Renaming would brick live beta/stable resolution.
  • Codemagic failure recovery: embeds the last 200 lines of the failed step log; emits ::warning::failure_profile unclassified when classification fails.

Deliberately not done

  • No lite/reduced qualification.
  • No manifest field rename.
  • No new alerting channel (hourly cron red + one durable issue, same pattern as proactive-health).
  • No changelog or Codemagic redesign (comment wording only in codemagic.yaml; fixture digests updated to match).
  • Backend admission/reserve/promote/breakglass routes and the desktop_beta_admission/control Firestore doc stay. No schema migration.
  • Harness T2 test-tier vocabulary stays. feature-vector.md was left alone because it only uses that harness vocabulary.

Necessary extras (CI would fail without them)

  • Removed qualification-lease from the dev-harness CLI because its module was deleted.
  • Synced desktop-release-source-identity.py path list with the planner (deleted files cannot remain as release inputs).
  • Stopped backend-release-policy from requiring the deleted qualify workflow.
  • Allowed ci-evidence/<sha> refs on Release Eligibility so the advertised mint recipe works.
  • Dormanted qualification-only failure classes and retargeted their canonical_prevention_artifact at check-release-process-guards.py (deleted paths fail scripts/failure-class).
  • desktop_release_doctor.yml doctor dispatch job deleted as specified; proactive-health kept.
  • newestSparkleVersion in web/admin/lib/desktop-release-lifecycle.ts uses exec loops, not for...of over String.matchAll(). That package sets "target": "es5", where iterating an IterableIterator is TS2802; it took the Web Checks Build job red on the first push. Local pre-push does not typecheck the Next.js admin app, so CI was the first place it could surface. Verified with npm run typecheck (clean) and npm test (88 passed / 14 files).

Product invariants affected

  • INV-AUTH-1 — codemagic.yaml wording only; session/401 policy unchanged.
  • INV-BETA-1 — Beta remains a separate installable identity with its own signed artifacts and identity-aware feed. This PR does not retire that identity. The deleted auto-beta-candidate gate test is replaced in the invariant's guard list by check-release-process-guards.py (both-identity signed smoke still required).

Rebased onto current main

The branch was DIRTY against main and is now rebased onto c2458931bf. The only conflicts were the three files this PR rewrites.

c2458931bf (#11575) clamped the planner's source-check wait to 45 minutes because the 90-minute wait outlived the 60-minute Omi Bot installation token, turning every hourly run red with gh: Bad credentials (401) (#11574). That fix is superseded, not dropped: this PR's planner evaluates the gate in a single pass and never sleeps, so the token-lifetime constraint disappears rather than being clamped. CI_GATE_TIMEOUT_SECONDS, --source-check-wait-seconds and --source-check-poll-seconds are gone, and a test asserts wait_for_required_source_checks no longer exists. The #11574 history is preserved as a comment where the wait used to be.

Skipped desktop jobs published the wrong check name

GitHub does not evaluate a job's name: for a skipped job. Both release-gate jobs carried a conditional name, so on every commit that skipped them the check was published under the raw expression text:

github.event.action == 'closed' && 'Desktop Swift PR Closure' || 'Desktop Swift Build & Tests'  => skipped

So on any commit not touching desktop paths, the required check Desktop Swift Build & Tests was absent, not skipped — and the planner reported missing instead of the truth. Verified on f666ddd4a3, 7a79f08329 and 7d7ed62e5: job skipped, run success, combined commit status success. All three read green.

The conditional existed to stop a merged pull_request.closed bookkeeping run from publishing a skipped required check onto the merge SHA. Dropping the closed event removes that hazard at the source, so both names become literals and the concurrency expression collapses to github.event_name == 'pull_request'. Skipped jobs now publish under their real names with conclusion skipped, which the planner already treats as blocked — accurate and loud, and still never success.

A contract test now fails if any job name in that workflow contains ${{, so this bug class cannot return.

A green tip now unblocks the train

The planner picks the newest desktop-touching commit. When that commit is red it could previously only fall back to an older green SHA, so a green tip did nothing and the train shipped stale code or wedged.

On Aug 14, main's tip was green while the newest desktop-touching commit below it (92f8de5f7e) was red on Desktop Swift Build & Tests — a flake. A first-parent commit above the blocked SHA contains everything the blocked SHA contains, so its own exact-SHA checks tested a superset of that tree. When those checks are genuinely green, the train may ship from that newer SHA.

newest_green_source_ahead is tried before the backward fallback, because it ships newer code rather than older. It is bounded by the same 20-commit budget.

This does not weaken the gate. Only a real ready gate qualifies, so a skipped or absent check is still never success — which also means a commit that does not touch desktop paths (whose Swift jobs skip) can never carry the train forward. It is strictly more evidence than the backward fallback it precedes, and it tightens the desktop-release-source-identity.py history guard rather than loosening it, since the planned source moves forward.

It also answers the flake question directly: a transient red no longer wedges shipping indefinitely, because the next commit that actually runs desktop CI green carries the train forward. The flaky tests themselves are out of scope here and are being fixed separately on fix/desktop-test-flakes.

Failure modes not addressed here

  • Release Eligibility failing for non-desktop reasons. It failed on 008ef016f1 and 9f87c2f24b on a backend line-count ratchet, which has nothing to do with desktop but still gates the desktop train. Removing it from the required set would weaken the gate, so it stays; the green-tip hop shortens the outage (the train recovers on the next green commit rather than staying wedged), and the freshness alarm makes the wedge visible. A narrower eligibility scope is a separate change.
  • No required status checks exist on main at all. repos/BasedHardware/omi/branches/main/protection returns no required_status_checks and rulesets is empty, so absent and failing checks are equally non-blocking at merge time. Branch protection is a repo-settings decision, not a code change, and is out of scope for this PR.

Failure-Class: none
Co-Authored-By: Claude Opus 5 [email protected]

@mintlify

mintlify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Aug 14, 2026, 8:52 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 97 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread desktop/macos/e2e/CORE_E2E.md Resolved
Comment thread .github/scripts/plan-desktop-release.py Resolved
@Git-on-my-level

Copy link
Copy Markdown
Member Author

@cursor address review comments and failing CI

@cursor

cursor Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

I addressed the cubic review comments and the Web Checks CI failure, then pushed five commits to ci/simplify-beta-release.

CI fix (Web Checks)

The Build job failed on desktop-release-lifecycle.ts because matchAll() returns an iterator that needs downlevelIteration. I switched to Array.from(...matchAll(...)). npm run typecheck passes.

Review fixes landed

Issue Fix
ci-evidence bypass verify_release_eligibility.py now requires the SHA to be reachable from origin/main (including ci-evidence mints)
Stale planner gate desktop_auto_release.yml always replans from fresh main before tagging; fallback scans prefetch producer workflow state once
Freshness monitor -m merge diffs, wedged train without tags, promotion lag uses candidate_publication_age_seconds, unified doctor concurrency, actions: read, fallback summary on checker failure
Admin appcast errors HTTP 200 without sparkle:version sets appcast_error/partial; dashboard shows PostHog and appcast errors together
Codemagic log exposure Broader query-string/PAT redaction + backtick escaping in fenced log tails
Misc P3 Order-insensitive release-eligibility trigger check, orphaned metadata helpers removed, qualification reintroduction guard test, CORE_E2E/changelog wording updated

Verification run locally

cd web/admin && npm run typecheck
python3 -m pytest -q \
  .github/scripts/test_check_release_eligibility.py \
  .github/scripts/test_check_desktop_beta_freshness.py \
  .github/scripts/test_desktop_codemagic_failure_recovery.py \
  .github/scripts/test_check_release_process_guards.py::test_desktop_promotion_guard_rejects_reintroduced_qualification_trigger \
  .github/scripts/test_plan_desktop_release.py::DesktopCandidateSourceCheckTests::test_workflow_is_a_single_ubuntu_plan_and_tag_job

All passed.

Desktop Swift CI note

The prior Swift failures (GlassSurfaceReviewRegressionTests, ProactiveLaneClientTests, RewindSurfaceLayoutTests, ShellModalScrimDismissTests, plus a flaky fault-suite case) are unrelated UI regression tests — not touched by this PR. They may need a separate fix or CI re-run.

Not changed (needs separate lifecycle PR per review)

Failure-class registry edits (FC-dev-fallback-masks-install-defect, dormant qualification classes) were left as-is; cubic flagged those for a registry-only follow-up PR.

Commits are on origin/ci/simplify-beta-release (e3dfbd5 → 58eb428). I couldn't auto-update the PR body (not agent-managed); the commit messages carry verification evidence.

Open in Web Open in Cursor 

Git-on-my-level and others added 3 commits August 14, 2026 23:11
Qualification never rolled back recent signed-smoke manifests and starved the
planner when a push event was missed. Remove the lane, make source-gate
failures diagnosable from one command, and alarm when candidate and live beta
diverge.

Co-authored-by: Cursor <[email protected]>
The auto-beta-candidate script is gone with the qualification lane; keep the
locked beta-identity invariant pointing at a guard that still exists.

Co-authored-by: Cursor <[email protected]>
…he train

Two failure modes survived the beta-train collapse and are fixed here.

Skipped jobs published the wrong check name. GitHub does not evaluate a
job's `name:` for a SKIPPED job, so the conditional names on `desktop-swift`
and `desktop-swift-release-compile` were published verbatim as the raw
expression text. On every commit that did not touch desktop paths the
required check `Desktop Swift Build & Tests` was therefore ABSENT rather
than skipped, and the planner reported "missing" instead of the truth.
Observed on f666ddd, 7a79f08 and 7d7ed62, all of which read green.
The conditional existed to keep a merged `pull_request.closed` bookkeeping
run from publishing a skipped required check onto the merge SHA; dropping
the `closed` event removes that hazard at the source and lets both names be
literals. A contract test now rejects any expression in a job name.

A green tip did not unblock the train. The planner selects the newest
desktop-touching commit and, when its checks are red, could only fall back
to an OLDER green SHA. On Aug 14 main's tip was green while the newest
desktop-touching commit below it was red on a flaky Swift suite, so the
train shipped stale code or wedged. A first-parent commit above the blocked
SHA contains everything the blocked SHA contains, so its own exact-SHA
checks tested a superset of that tree; when they are genuinely green the
train may ship from that newer SHA. Tried before the backward fallback,
because it ships newer code. Only a real `ready` gate qualifies, so a
skipped or absent check still never counts as success.

Also keep the beta rollback precondition expressible: beta manifests carry
the `signed-smoke` tier, whose frozen-schema truth is
`qualification_passed: False`, so the literal T2/True requirement rejected
every current rollback target.

Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
… es5 target

`newestSparkleVersion` iterated `String.matchAll()` with `for...of`. The admin
package sets "target": "es5", where iterating an IterableIterator is TS2802,
so `npm run typecheck` failed and took the Web Checks Build job red. Local
pre-push does not typecheck the Next.js admin app, so CI was the first place
this could surface.

Use `exec` loops instead of widening the package's compile target, which would
change output for every file to fix one.

Verified with the same commands CI runs: `npm run typecheck` clean and
`npm test` 88 passed across 14 files.

Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 78a9bf7 into main Aug 15, 2026
44 of 45 checks passed
@Git-on-my-level
Git-on-my-level deleted the ci/simplify-beta-release branch August 15, 2026 04:38
Git-on-my-level added a commit that referenced this pull request Aug 15, 2026
* fix(ci): redact recovery logs and keep qualification reintroduction tested

Codemagic log tails could persist query tokens and GitHub PATs in durable
issues, the freshness monitor lacked Actions/checks read, and the
qualification-trigger mutation test was dropped with the old runner.

Co-authored-by: Cursor <[email protected]>

* style: drop extra blank line that failed diff-hygiene

Co-authored-by: Cursor <[email protected]>

* fix(ci): redact OAuth fragments without wiping triage query params

Generic query redaction leaked `#code=` values and blanked harmless
build/arch/mode fields. Scope assignment redaction to credential-like
names, treat `#` as a delimiter, and drop the comment-only qualification
mutation that locked in a substring false positive.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant