Repository navigation
fix(release): robust Codemagic qualification handoff + fail-open fallback gating - #10380
Merged
Merged
Conversation
…robust Two defects found in the merged qualification lanes (#10354/#10363), neither covered by the existing tests: 1. Codemagic artifact handoff was unverified and shape-fragile. The CM lane publishes build/qualification/** (JSON), and Codemagic packages arbitrary files matching a directory/** glob into a single zip artefact rather than exposing each as a top-level artefact. desktop_codemagic_qualification.py only matched a top-level 'qualification-result.json', so a zipped artefact would make every CM qualification silently fall through to the self-hosted lanes — defeating the CM-primary design. fetch_result_artifact now prefers the top-level file and otherwise extracts the result from a zip artefact by basename. Regression tests cover both shapes + zip-missing-result. 2. plan-fallbacks did not fully fail open. The gh-api status step fails open, but a failure in the earlier token-generation step fails the whole job with empty outputs, and the lanes gated on 'm{1,4}_online == true' → empty != true → BOTH self-hosted fallbacks skipped, re-creating the single-machine outage on any token hiccup. Gate now fails open ('!= false'): a lane is skipped only when the planner explicitly reports the runner offline. Verified: test_desktop_codemagic_qualification 13 OK (incl. zip cases); test_desktop_release_flow_contract 20 OK (asserts fail-open gating); actionlint exit 0; check-release-process-guards passed; dev-harness 50 passed; qualification bootstrap contract passed. Note: end-to-end CM handoff on a real green build stays UNVERIFIED until the cold-build timeout fix (#10374) lets a CM qualification build complete; the driver is now correct for whatever artefact shape Codemagic produces. Failure-Class: FC-single-machine-release-gate
undivisible
pushed a commit
to undivisible/omi
that referenced
this pull request
Sep 29, 2026
…back gating (BasedHardware#10380) ## Two robustness defects in the merged qualification lanes (BasedHardware#10354/BasedHardware#10363) Cross-review found two real gaps in the multi-lane qualification, neither covered by the existing tests. Both keep the "at least one lane qualifies a healthy candidate" guarantee honest. ### 1. Codemagic artifact handoff was shape-fragile (and unverified end-to-end) The CM lane publishes `build/qualification/**` (JSON). Codemagic exposes recognized build outputs (`.app`/`.dmg`/`.zip`/…) as top-level artefacts but packages arbitrary files matching a directory/`**` glob into a **single zip artefact**. `desktop_codemagic_qualification.py` only matched a top-level `qualification-result.json`, so a zipped artefact would make the driver fail to find the result → **every CM qualification silently falls through to the self-hosted lanes**, defeating the CM-primary design. `fetch_result_artifact` now prefers a top-level file and otherwise **extracts the result from a zip artefact by basename** (so an internal path like `qualification/qualification-result.json` still resolves). The driver adapts to whatever shape Codemagic produces, so the digest-pinned `codemagic.yaml` needs no change. *Honesty note:* all prior live CM test builds died at the venv step (fixed separately in BasedHardware#10374), so a real CM build never produced this artefact — the handoff stays **UNVERIFIED end-to-end** until BasedHardware#10374 lets a CM qualification complete. This PR makes the driver correct for both artefact shapes and covers them with tests; the live confirmation is a follow-up once a green CM build exists. ### 2. `plan-fallbacks` did not fully fail open The `gh api` runner-status step fails open, but a failure in the **earlier token-generation step** fails the whole `plan-fallbacks` job with empty outputs. The lanes gated on `m{1,4}_online == 'true'`, so empty `!= 'true'` → **both self-hosted fallbacks skipped** — re-creating the single-machine outage on any token hiccup. Gate now fails open: `m{1,4}_online != 'false'` — a lane is skipped only when the planner **explicitly** reports the runner offline. A planner failure now lets the fallbacks attempt. ## Verification - `python3 .github/scripts/test_desktop_codemagic_qualification.py` → 13 OK (new: extract-from-zip, prefer-top-level-over-zip, zip-without-result-fails) - `python3 .github/scripts/test_desktop_release_flow_contract.py` → 20 OK (asserts `!= 'false'` fail-open gating on both lanes; `== 'true'` explicitly forbidden) - `actionlint .github/workflows/desktop_qualify_beta.yml` → exit 0 - `python3 .github/scripts/check-release-process-guards.py` → passed - `bash scripts/dev-harness/run-tests.sh` → 50 passed - `bash desktop/macos/tests/test-qualify-desktop-beta-contract.sh` → passed - `make preflight` → (see checks) Failure-Class: FC-single-machine-release-gate <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10380?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two robustness defects in the merged qualification lanes (#10354/#10363)
Cross-review found two real gaps in the multi-lane qualification, neither covered by the existing tests. Both keep the "at least one lane qualifies a healthy candidate" guarantee honest.
1. Codemagic artifact handoff was shape-fragile (and unverified end-to-end)
The CM lane publishes
build/qualification/**(JSON). Codemagic exposes recognized build outputs (.app/.dmg/.zip/…) as top-level artefacts but packages arbitrary files matching a directory/**glob into a single zip artefact.desktop_codemagic_qualification.pyonly matched a top-levelqualification-result.json, so a zipped artefact would make the driver fail to find the result → every CM qualification silently falls through to the self-hosted lanes, defeating the CM-primary design.fetch_result_artifactnow prefers a top-level file and otherwise extracts the result from a zip artefact by basename (so an internal path likequalification/qualification-result.jsonstill resolves). The driver adapts to whatever shape Codemagic produces, so the digest-pinnedcodemagic.yamlneeds no change.Honesty note: all prior live CM test builds died at the venv step (fixed separately in #10374), so a real CM build never produced this artefact — the handoff stays UNVERIFIED end-to-end until #10374 lets a CM qualification complete. This PR makes the driver correct for both artefact shapes and covers them with tests; the live confirmation is a follow-up once a green CM build exists.
2.
plan-fallbacksdid not fully fail openThe
gh apirunner-status step fails open, but a failure in the earlier token-generation step fails the wholeplan-fallbacksjob with empty outputs. The lanes gated onm{1,4}_online == 'true', so empty!= 'true'→ both self-hosted fallbacks skipped — re-creating the single-machine outage on any token hiccup.Gate now fails open:
m{1,4}_online != 'false'— a lane is skipped only when the planner explicitly reports the runner offline. A planner failure now lets the fallbacks attempt.Verification
python3 .github/scripts/test_desktop_codemagic_qualification.py→ 13 OK (new: extract-from-zip, prefer-top-level-over-zip, zip-without-result-fails)python3 .github/scripts/test_desktop_release_flow_contract.py→ 20 OK (asserts!= 'false'fail-open gating on both lanes;== 'true'explicitly forbidden)actionlint .github/workflows/desktop_qualify_beta.yml→ exit 0python3 .github/scripts/check-release-process-guards.py→ passedbash scripts/dev-harness/run-tests.sh→ 50 passedbash desktop/macos/tests/test-qualify-desktop-beta-contract.sh→ passedmake preflight→ (see checks)Failure-Class: FC-single-machine-release-gate