Skip to content

fix(release): pre-tag readiness gate crashed on bash 3.2, blocking every auto-release - #10402

Merged
kodjima33 merged 1 commit into
mainfrom
desktop/fix-pretag-readiness-bash32
Jul 23, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
desktop/fix-pretag-readiness-bash32

Conversation

@kodjima33

@kodjima33 kodjima33 commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix the bug that has been silently blocking every desktop auto-release. pre-tag-readiness.sh runs on the trusted M1 under macOS bash 3.2, and line 205 expanded "${KEEP_FLAG[@]}" — an EMPTY array under set -u, which traps unbound variable on bash 3.2 and exits 1. KEEP_FLAG is empty on the normal path (KEEP_STACK != 1), so the readiness gate failed on effectively every release, and tag-release (which needs: pre-tag-readiness) skipped → no tag, no GitHub release, no Codemagic build. This is why scheduled/auto releases produced no tags and I had to hand-tag 111–114.

Fix

Use the bash-3.2-safe ${KEEP_FLAG[@]+"${KEEP_FLAG[@]}"} expansion (only expands when set). Behaves identically on bash 4.4+.

Verification

  • Reproduced on /bin/bash 3.2.57 (the M1 runner's bash): set -u; KEEP_FLAG=(); "${KEEP_FLAG[@]}" → unbound variable, exit 1. The [@]+ form → no error, empty→[--readiness], populated→[--readiness --keep-stack].
  • bash -n clean. Failing live evidence: run 30022355954, pre-tag-readiness step KEEP_FLAG[@]: unbound variable at line 205.
  • Regression guard added to test_pre_tag_readiness_workflow_contract (forbids the unsafe form, requires the safe one). pytest plan suite → 6 passed.

Failure-Class: new

Review in cubic

…ery auto-release

pre-tag-readiness.sh runs on the trusted M1 under macOS bash 3.2. Line 205
expanded "${KEEP_FLAG[@]}" — an empty array under set -u — which traps
'unbound variable' on bash 3.2 and exits 1. KEEP_FLAG is empty on the normal
path (KEEP_STACK != 1), so the readiness gate failed on effectively every
release and tag-release (needs: pre-tag-readiness) skipped: no tag, no GitHub
release, no Codemagic build. This is why scheduled auto-releases produced no
tags and 111-114 had to be hand-tagged.

Fix: bash-3.2-safe ${KEEP_FLAG[@]+"${KEEP_FLAG[@]}"} expansion (identical on
bash 4.4+). Regression guard added to the readiness contract test.

Reproduced on /bin/bash 3.2.57; live evidence run 30022355954 shows
'KEEP_FLAG[@]: unbound variable' at line 205. bash -n clean; pytest 6 passed.

Failure-Class: new
@kodjima33
kodjima33 merged commit 8bbee8e into main Jul 23, 2026
@kodjima33
kodjima33 deleted the desktop/fix-pretag-readiness-bash32 branch July 23, 2026 16:11
kodjima33 added a commit that referenced this pull request Jul 23, 2026
Registry-only correction: FC-shell-unset-array-under-nounset was
authored with a placeholder evidence PR (#10388, an unrelated
changelog-exemption test) before the real fix existed. The bash 3.2
pre-tag-readiness fix merged as #10402; evidence_prs now points at it.

Checks: JSON valid; pytest test_plan_desktop_release +
test_desktop_release_flow_contract = 26 passed; bash -n
pre-tag-readiness.sh clean.
kodjima33 added a commit that referenced this pull request Jul 23, 2026
…10404)

## Summary
Restore **continuous deployment** of the desktop beta: plan a candidate
on **every macOS-affecting merge to main** (revert of the 6-hourly-only
#10386), with the hourly `schedule` as a backstop. The candidate then
flows through the existing two-machine qualification pipeline and, on
pass, promotes to beta — no new downstream wiring needed.

## Full pipeline (unchanged downstream, restored front-end)
1. **`desktop_auto_release.yml`** — `push` on `main` (releasable desktop
paths) → plans + tags `v*-macos`. (this PR)
2. **Codemagic `omi-desktop-swift-release`** — builds universal binary,
Developer ID sign, Apple notarize, DMG + **Sparkle ZIP**, publishes
immutable candidate.
3. **`desktop_qualify_beta.yml`** — Codemagic primary lane + self-hosted
`qualify-m1-studio` and `qualify-m4-mini` (the 2 machines), fail-closed,
at-least-one-passes verdict.
4. **`desktop_promote_beta.yml`** — on qualification success, advances
the beta channel pointer to the qualified, Sparkle-signed artifact.

## Changes
- `desktop_auto_release.yml`: re-added the `push` trigger (paths:
`desktop/macos/**`, `codemagic.yaml`, planner script, the two
workflows); schedule reverted to hourly `17 * * * *` backstop.
- Contract tests restored to require the push trigger + the
push-paths↔releasable-paths alignment guard
(`test_push_paths_cover_releasable_desktop_paths` +
`_parse_push_filter`); cron assertion back to hourly. Kept the #10402
bash-3.2 readiness regression test.
- `desktop/macos/AGENTS.md`: Release Pipeline section describes the
continuous cadence.

## Verification
- `pytest` plan + flow-contract suites → 27 passed, 37 subtests.
actionlint clean. YAML triggers = [workflow_dispatch, push, schedule].

Note: end-to-end auto-promotion to beta additionally depends on
qualification passing (the cold-build-timeout fix #10374 and the
just-landed pre-tag-readiness bash-3.2 fix #10402). Those are the
qualification gates, separate from this front-end trigger change.
Archit-lal pushed a commit to Archit-lal/omi that referenced this pull request Jul 23, 2026
…R to BasedHardware#10402

The failure class was authored with a placeholder evidence PR (BasedHardware#10388, an
unrelated changelog-exemption test) before the real fix PR existed. The bash 3.2
pre-tag-readiness fix merged as BasedHardware#10402; point evidence_prs at it.
Archit-lal pushed a commit to Archit-lal/omi that referenced this pull request Jul 23, 2026
Revert the 6-hourly-only cadence (BasedHardware#10386): plan a beta candidate on every
macOS-affecting push to main, with the hourly schedule as a backstop. The
candidate flows through the existing two-machine qualification pipeline
(desktop_qualify_beta.yml: Codemagic primary + qualify-m1-studio/qualify-m4-mini)
and, on qualification success, desktop_promote_beta.yml advances the beta channel
to the Codemagic-built, notarized, Sparkle-signed artifact.

Restored the push trigger, the push-paths<->releasable-paths alignment guard,
and the hourly cron assertion; kept the BasedHardware#10402 bash-3.2 readiness regression
test. AGENTS.md Release Pipeline section updated to the continuous cadence.

Verified: pytest plan + flow-contract 27 passed; actionlint clean; make
preflight green (9 checks).
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…ery auto-release (BasedHardware#10402)

## Summary
Fix the bug that has been silently blocking every desktop auto-release.
`pre-tag-readiness.sh` runs on the trusted M1 under **macOS bash 3.2**,
and line 205 expanded `"${KEEP_FLAG[@]}"` — an EMPTY array under `set
-u`, which traps `unbound variable` on bash 3.2 and exits 1. `KEEP_FLAG`
is empty on the normal path (`KEEP_STACK != 1`), so the readiness gate
failed on effectively every release, and `tag-release` (which `needs:
pre-tag-readiness`) skipped → no tag, no GitHub release, no Codemagic
build. This is why scheduled/auto releases produced no tags and I had to
hand-tag 111–114.

## Fix
Use the bash-3.2-safe `${KEEP_FLAG[@]+"${KEEP_FLAG[@]}"}` expansion
(only expands when set). Behaves identically on bash 4.4+.

## Verification
- Reproduced on `/bin/bash` 3.2.57 (the M1 runner's bash): `set -u;
KEEP_FLAG=(); "${KEEP_FLAG[@]}"` → `unbound variable`, exit 1. The
`[@]+` form → no error, empty→`[--readiness]`, populated→`[--readiness
--keep-stack]`.
- `bash -n` clean. Failing live evidence: run 30022355954,
`pre-tag-readiness` step `KEEP_FLAG[@]: unbound variable` at line 205.
- Regression guard added to `test_pre_tag_readiness_workflow_contract`
(forbids the unsafe form, requires the safe one). `pytest` plan suite →
6 passed.

Failure-Class: new
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…R to BasedHardware#10402

The failure class was authored with a placeholder evidence PR (BasedHardware#10388, an
unrelated changelog-exemption test) before the real fix PR existed. The bash 3.2
pre-tag-readiness fix merged as BasedHardware#10402; point evidence_prs at it.
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…ardware#10403)

Registry-only correction: FC-shell-unset-array-under-nounset was
authored with a placeholder evidence PR (BasedHardware#10388, an unrelated
changelog-exemption test) before the real fix existed. The bash 3.2
pre-tag-readiness fix merged as BasedHardware#10402; evidence_prs now points at it.

Checks: JSON valid; pytest test_plan_desktop_release +
test_desktop_release_flow_contract = 26 passed; bash -n
pre-tag-readiness.sh clean.
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
Revert the 6-hourly-only cadence (BasedHardware#10386): plan a beta candidate on every
macOS-affecting push to main, with the hourly schedule as a backstop. The
candidate flows through the existing two-machine qualification pipeline
(desktop_qualify_beta.yml: Codemagic primary + qualify-m1-studio/qualify-m4-mini)
and, on qualification success, desktop_promote_beta.yml advances the beta channel
to the Codemagic-built, notarized, Sparkle-signed artifact.

Restored the push trigger, the push-paths<->releasable-paths alignment guard,
and the hourly cron assertion; kept the BasedHardware#10402 bash-3.2 readiness regression
test. AGENTS.md Release Pipeline section updated to the continuous cadence.

Verified: pytest plan + flow-contract 27 passed; actionlint clean; make
preflight green (9 checks).
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…asedHardware#10404)

## Summary
Restore **continuous deployment** of the desktop beta: plan a candidate
on **every macOS-affecting merge to main** (revert of the 6-hourly-only
BasedHardware#10386), with the hourly `schedule` as a backstop. The candidate then
flows through the existing two-machine qualification pipeline and, on
pass, promotes to beta — no new downstream wiring needed.

## Full pipeline (unchanged downstream, restored front-end)
1. **`desktop_auto_release.yml`** — `push` on `main` (releasable desktop
paths) → plans + tags `v*-macos`. (this PR)
2. **Codemagic `omi-desktop-swift-release`** — builds universal binary,
Developer ID sign, Apple notarize, DMG + **Sparkle ZIP**, publishes
immutable candidate.
3. **`desktop_qualify_beta.yml`** — Codemagic primary lane + self-hosted
`qualify-m1-studio` and `qualify-m4-mini` (the 2 machines), fail-closed,
at-least-one-passes verdict.
4. **`desktop_promote_beta.yml`** — on qualification success, advances
the beta channel pointer to the qualified, Sparkle-signed artifact.

## Changes
- `desktop_auto_release.yml`: re-added the `push` trigger (paths:
`desktop/macos/**`, `codemagic.yaml`, planner script, the two
workflows); schedule reverted to hourly `17 * * * *` backstop.
- Contract tests restored to require the push trigger + the
push-paths↔releasable-paths alignment guard
(`test_push_paths_cover_releasable_desktop_paths` +
`_parse_push_filter`); cron assertion back to hourly. Kept the BasedHardware#10402
bash-3.2 readiness regression test.
- `desktop/macos/AGENTS.md`: Release Pipeline section describes the
continuous cadence.

## Verification
- `pytest` plan + flow-contract suites → 27 passed, 37 subtests.
actionlint clean. YAML triggers = [workflow_dispatch, push, schedule].

Note: end-to-end auto-promotion to beta additionally depends on
qualification passing (the cold-build-timeout fix BasedHardware#10374 and the
just-landed pre-tag-readiness bash-3.2 fix BasedHardware#10402). Those are the
qualification gates, separate from this front-end trigger change.
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