Skip to content

Commit 935fee2

Browse files
committed
fix(ci): guard bare [[ URL ]] last-command and initialize ARCH_DIGESTS=()
Two bugs affecting all non-goose apps (ghostty, thunderbird-nightly, virtualbox, firefox-nightly, lmstudio, Kontainer, Tuner): 1. build.yml sign-and-push 'Read release metadata' step: bare '[[ -n "${URL}" ]] && echo ...' evaluates false for apps with no url field, causing the step to exit 1 under bash -e as the last command. Fix: append '|| true' so the step always exits 0. 2. Justfile push-manifest-list: 'declare -A ARCH_DIGESTS' with no explicit empty init causes 'ARCH_DIGESTS: unbound variable' under set -u when the associative array is empty (bash 4.x). Fix: 'declare -A ARCH_DIGESTS=()' with explicit empty initializer. These fixes were present in the working tree after the PR merge but were never committed. The squashed PR commit (2fb7cf5) shipped both bugs to main. Also committed: AGENTS.md CI validation gate section — a goose-only green run is insufficient for CI-wide changes; must also pass thunderbird-nightly. Assisted-by: Claude Sonnet 4.6 via OpenCode
1 parent b56b83e commit 935fee2

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ jobs:
369369
|| echo "==> No version — only :latest will be pushed"
370370
URL=$(just metadata '${{ matrix.app }}' url 2>/dev/null || echo "")
371371
[[ "${URL}" == "null" ]] && URL=""
372-
[[ -n "${URL}" ]] && echo "UPSTREAM_URL=${URL}" >> "$GITHUB_ENV"
372+
[[ -n "${URL}" ]] && echo "UPSTREAM_URL=${URL}" >> "$GITHUB_ENV" || true
373373
374374
- name: Download OCI artifact
375375
if: steps.arch-check.outputs.skip != 'true'

AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ that area.
3333
When triggering a manual test build, always use `goose` (bundle-repack, fastest — no compile step).
3434
Never use `ghostty` for test builds (full Zig compile via flatpak-builder, very slow).
3535

36+
## CI validation gate
37+
38+
**A goose-only green run is not sufficient to declare any CI change complete.**
39+
40+
goose is a `release.yaml` app with a `url` field. It exercises a different code path than
41+
`manifest.yaml` apps and apps without a `url` field (ghostty, thunderbird-nightly, virtualbox).
42+
43+
**Before merging any change to `build.yml`, `Justfile`, or `update-index.yml`:**
44+
45+
- Smoke test (fast): `goose` — catches most regressions quickly
46+
- Full gate: must also pass for at least one `manifest.yaml` app with no `url` field
47+
48+
Use `thunderbird-nightly` as the second app (x86_64-only, no Zig compile, faster than ghostty).
49+
If the change is CI-wide (affects all apps/jobs), trigger **both** before declaring complete.
50+
3651
## Flatpak installation policy
3752

3853
Always install Flatpaks system-wide. Never use `--user`.

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ push-manifest-list app registry="ghcr.io":
626626
fi
627627

628628
# Collect per-arch digests
629-
declare -A ARCH_DIGESTS
629+
declare -A ARCH_DIGESTS=()
630630
for ARCH in x86_64 aarch64; do
631631
DIGEST_FILE="/tmp/digests/${ARCH}/digest.txt"
632632
if [[ -f "${DIGEST_FILE}" ]]; then

0 commit comments

Comments
 (0)