Repository navigation
Conversation
…sh (#3195) _gstack_bun_below split "MAJOR MINOR PATCH" with an unquoted `set -- "$1" $_gb_core`. /gstack-upgrade sources gstack-bun-version.sh in the agent's tool shell, which is zsh on a default macOS Claude Code, and zsh does not word-split unquoted parameters. Every `[ -ne ]` then errored ("integer expression expected: 1 3 3"), the function returned 1, and gstack_bun_status reported every version as `ok`, including Bun below the security floor (1.3.2), so the pre-advance hold never fired. Compare named fields instead. bash results are unchanged; zsh now matches them for the whole comparison table, which the test runs under both shells when zsh is installed. Reverting the library change fails the new zsh case ("1.3.2": expected too-old, received ok). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Triage (fix wave 5, GSTA-37): thanks, the diagnosis is right. #3195 is already fixed independently in wave 1a (#3202, commit 6eb0ac3, shipping in #3209): it compares quoted fields and treats an unparseable version as "malformed" instead of "not below". Your zsh table matches its tests. Once #3209 merges, this PR is superseded and will be closed with credit. |
|
Thank you, @schienbiz! This bug was fixed in v1.91.106.0 (main 3e8b34d, wave PR #3209). The fix landed as part of #3195: |
Fixes #3195.
What breaks
/gstack-upgradeStep 4 sourcesbin/gstack-bun-version.shin the agent's tool shell to check the incoming release's Bun floor. On a default macOS Claude Code that shell is zsh._gstack_bun_belowsplit"MAJOR MINOR PATCH"with an unquotedset -- "$1" $_gb_core, and zsh does not word-split unquoted parameters, so each[ -ne ]got"1 3 3", errored (integer expression expected), and the function returned 1 ("not below").As a result,
gstack_bun_statusreports every version asokunder zsh, including Bun belowGSTACK_BUN_FLOOR, the version the file's comment says loads a project's.env:The
bin/callers (gstack-upgrade,gstack-session-update,setup) have bash shebangs and were not affected. Only callers that source the file from the user's shell were.Change
bin/gstack-bun-version.sh:_gstack_bun_belowcompares named fields (_gb_r1..3,_gb_v1..3) instead of the word-split positional parameters. Same comparison logic, and nothing depends on word splitting.test/setup-bun-floor.test.ts: the existing comparison table moves into a shared constant and runs under bash and, when installed, zsh (test.skipIf(!HAS_ZSH)).Verification (macOS, bun 1.3.14, zsh 5.9, bash 5.3.9)
bun test test/setup-bun-floor.test.ts test/bun-version-drift.test.ts: 15 pass, 0 fail."1.3.2": expected "too-old", received "ok"); the bash case still passes.bun run test(full free suite) exits 1 locally. I re-ran the failing files the runner named, on this branch and on unmodified47d639ab: the same 49 tests fail on both (CSO compiled-binary/hardened-runtime launcher, PTY redraw timing, autoplan run concurrency, setup skill copies). Separately, 2 tests insession-update-hook-hold.test.tsfail on base as well (they expect a repo-relative hook path but get a macOS/private/var/...temp path). None of them touch this file. The runner's "real home changed" warning came from my Claude Code session writing~/.claude/backupsduring the run, not from a test. CI's Linuxfree-testsis the authoritative signal here.Not bumping VERSION/CHANGELOG; leaving that to release time.
Still open from #3195 (not in this PR): a malformed floor still returns 1 from
_gstack_bun_below, which callers read as "not below". Making that fail closed changesgstack_bun_incoming_hold's contract, so it seemed better as its own change.🤖 Generated with Claude Code