Skip to content

mk-release: anchor output/dist arguments to the caller's cwd - #181

Merged
mcfbytes merged 1 commit into
masterfrom
fix/mk-release-relative-dist
Sep 16, 2026
Merged

mcfbytes merged 1 commit into
masterfrom
fix/mk-release-relative-dist

Conversation

@mcfbytes

Copy link
Copy Markdown
Owner

The failure

Run 35033662179 (v2026.09.15-beta) died in Stage, package and verify the release assets:

scripts/mk-release.sh: line 85: dist/release_20260915.7z: No such file or directory
    wrote dist/release_20260915.7z ( bytes)
...
verify-stock-payload.sh: roundtrip: 'dist/release_20260915.7z' does not exist

Nothing upstream was yanked. The stock payload fetch/verify passed clean in the same run:

fetch-stock: 2 volume(s) joined -> .../release-work/stock_release.7z
verify-stock: ... verified -- size/MD5/SHA-256/internal-CRC all match.
verify-uboot: uboot.img and updateboot confirmed byte-identical to stock.

Cause

release.yml calls scripts/mk-release.sh output dist, so $dist was the relative string dist. Step 4 packs the archive from inside a subshell that has cd'd to release-work/release-stage:

( cd "$work/release-stage" && 7z a ... "$dist/release_$release_date.7z" files/ )

7z creates a missing output directory and exits 0, so the pack "succeeded" — into release-work/release-stage/dist/release_20260915.7z. Verified locally: 7z a dist/x.7z from a directory with no dist/ returns 0 and makes the directory.

The next line's wc -c redirection then failed inside a command substitution, which set -e does not catch, so the run limped on to the round-trip step and died there with a misleading message pointing at the stock payload script.

The default invocation (out=$ROOT/output, dist=$ROOT/dist) is absolute, which is why local runs never hit this — only the CI call site passes relative paths.

Fix

  • Absolutize both arguments before anything changes directory.
  • Assert the pack's own product, so a future variant of this fails at the line that caused it instead of three steps later.

shellcheck -x scripts/mk-release.sh is clean.

To ship 20260915

This needs to be on the tagged commit, so v2026.09.15-beta has to be re-cut after merge.

🤖 Generated with Claude Code

release.yml calls `scripts/mk-release.sh output dist`, so $dist was the
relative string "dist". Step 4 packs the archive from inside a subshell
that has cd'd to release-work/release-stage, and 7z quietly CREATES a
missing output directory and exits 0 -- so the pack "succeeded" into
release-work/release-stage/dist/release_20260915.7z and dist/ never got
the file. The next line's `wc -c` redirection failed inside a command
substitution (which set -e does not catch), so the run limped on to the
round-trip step before dying with a misleading "does not exist".

Absolutize both arguments before anything changes directory, and make the
pack step assert its own product so a future variant of this fails at the
line that caused it.

Found by the v2026.09.15-beta release run (actions run 35033662179); the
stock payload fetch/verify was fine, nothing upstream was yanked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mcfbytes
mcfbytes merged commit d7aa33c into master Sep 16, 2026
4 checks passed
@mcfbytes
mcfbytes deleted the fix/mk-release-relative-dist branch September 16, 2026 01:12
mcfbytes added a commit that referenced this pull request Sep 16, 2026
mk-release: anchor output/dist arguments to the caller's cwd
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