Repository navigation
ci: collapse desktop beta to signed-smoke plus hourly freshness - #11588
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
All reported issues were addressed across 97 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
@cursor address review comments and failing CI |
|
I addressed the cubic review comments and the Web Checks CI failure, then pushed five commits to CI fix (Web Checks)The Build job failed on Review fixes landed
Verification run locallycd 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_jobAll passed. Desktop Swift CI noteThe prior Swift failures ( Not changed (needs separate lifecycle PR per review)Failure-class registry edits ( Commits are on |
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]>
58eb428 to
b5e1fad
Compare
… 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]>
* 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]>


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
desktop_auto_release.yml(7 * * * *, plusworkflow_dispatch) runs one Ubuntu jobplan-and-tag.mainSHA in a single pass (ready/defer/blocked). Adeferafter changelog merge exits 0; the next hourly tick tags, and changelog reuse makes it idempotent.ready, it consolidates changelog, publishes an immutablev*-macostag, and waits up to 10 minutes for Codemagic tag intake.desktop_release_doctor.yml(23 * * * *) keepsproactive-healthand addsbeta-freshness, which also maintains one durable GitHub issue titledDesktop beta freshness alarm.Dispatch entry point for promotion retry remains
desktop_recover_beta.yml(desktop_promote_beta.ymlis stillworkflow_call-only).Source gate (three outcomes)
Required checks, each mapped to a producer workflow:
Release Eligibility→.github/workflows/release-eligibility.ymlDesktop Swift Build & Tests→.github/workflows/desktop-swift-ci.ymlDesktop Swift Release Compile→.github/workflows/desktop-swift-ci.ymlready— 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:
blocked(exit 1 +::error, unless a newer-green fallback SHA exists). Producer disabled:Completed non-success (no fallback):
Missing check after the producer completed:
Push event never arrived (commit age >10 min, no run, no fallback):
If a newest-green fallback SHA exists, the planner emits
::warningand 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-freshnesson the existing hourly doctor workflow. Stdlib-only.github/scripts/check-desktop-beta-freshness.py(GH_TOKEN + unauthenticated HTTPS).candidate_build(highestv*-macostag) >live_beta_build(newestsparkle:versioninhttps://api.omi.me/v2/desktop/appcast.xml?identity=beta) AND the tag commit is older than 10800s (3h). Diagnosis comes from that tag SHA'sRelease OMI Desktop (Swift)check: failure → re-run Codemagic or dispatch Desktop Release Recovery Required; success → dispatch Retry Desktop Beta Promotion (desktop_recover_beta.yml) withrelease_tag=<tag>; absent → dispatch Build Desktop Release Candidate.maincommit touching releasable desktop paths is older than 21600s (6h) and is not an ancestor of the newestv*-macostag. 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
qualification_tier == "T2"andqualification_passed is True. Every recent live manifest issigned-smoke/False, so rollback was already impossible. Rollback now rejects onlyqualification_tier == "emergency".candidate → beta_live → stable(plus nominationstable_candidate).beta_livemeans the tag equals the newest item in the public beta appcast (fetched server-side).DesktopQualification,desktopQualificationFromMetadata,qualified_beta, andqualified_*response fields are gone. Stable nomination no longer requiresstableCandidateQualificationEvidence. The "Qualified beta" state is gone.qualification_tier/qualification_passedstay. Comments annotate them as legacy evidence-class fields;'signed-smoke'is the only tier new manifests carry. Renaming would brick live beta/stable resolution.::warning::failure_profile unclassifiedwhen classification fails.Deliberately not done
codemagic.yaml; fixture digests updated to match).desktop_beta_admission/controlFirestore doc stay. No schema migration.feature-vector.mdwas left alone because it only uses that harness vocabulary.Necessary extras (CI would fail without them)
qualification-leasefrom the dev-harness CLI because its module was deleted.desktop-release-source-identity.pypath list with the planner (deleted files cannot remain as release inputs).ci-evidence/<sha>refs on Release Eligibility so the advertised mint recipe works.canonical_prevention_artifactatcheck-release-process-guards.py(deleted paths failscripts/failure-class).desktop_release_doctor.ymldoctor dispatch job deleted as specified;proactive-healthkept.newestSparkleVersioninweb/admin/lib/desktop-release-lifecycle.tsusesexecloops, notfor...ofoverString.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 withnpm run typecheck(clean) andnpm test(88 passed / 14 files).Product invariants affected
codemagic.yamlwording only; session/401 policy unchanged.check-release-process-guards.py(both-identity signed smoke still required).Rebased onto current main
The branch was
DIRTYagainstmainand is now rebased ontoc2458931bf. 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 withgh: 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-secondsand--source-check-poll-secondsare gone, and a test assertswait_for_required_source_checksno 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:So on any commit not touching desktop paths, the required check
Desktop Swift Build & Testswas absent, not skipped — and the planner reportedmissinginstead of the truth. Verified onf666ddd4a3,7a79f08329and7d7ed62e5: jobskipped, runsuccess, combined commit statussuccess. All three read green.The conditional existed to stop a merged
pull_request.closedbookkeeping run from publishing a skipped required check onto the merge SHA. Dropping theclosedevent removes that hazard at the source, so both names become literals and the concurrency expression collapses togithub.event_name == 'pull_request'. Skipped jobs now publish under their real names with conclusionskipped, 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 onDesktop 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_aheadis 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
readygate 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 thedesktop-release-source-identity.pyhistory 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
008ef016f1and9f87c2f24bon 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.mainat all.repos/BasedHardware/omi/branches/main/protectionreturns norequired_status_checksandrulesetsis 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]