Uh oh!
There was an error while loading. Please reload this page.
fix(scripts): correct bash-3.2 comment's stated mechanism in bump-objectui.sh - #12306
Merged
yinlianghui merged 1 commit intoAug 25, 2026
Merged
Conversation
…ectui.sh The bash-3.2 note explaining why the ref-collection loop uses `if [[ -n "$x" ]]; then …; fi` rather than a trailing `[[ … ]] && …` attributed the trap to the empty-list case. Measured on bash 5.2.21, that does not reproduce: an all-empty read leaves the loop body unexecuted and the `while` exits 0. The real trap is a non-empty read whose last line fails the test, and only once that loop is the last command of a function — the `&&`-list's false status becomes the loop's exit status, becomes the function's return, and `set -e` kills the caller on that. Measured over all four combinations (empty vs. non-empty-with-failing-last- line × loop-is-fn's-last-command vs. not): only that one combination exits 1; the other three exit 0. The `if` form itself is unchanged and correct — only the stated reason was wrong. Fixes#12222 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_af22b339-91b5-5814-8b9b-2453fc5b3f68
This was referenced Aug 25, 2026
yinlianghui
marked this pull request as ready for review
August 25, 2026 17:28
Uh oh!
There was an error while loading. Please reload this page.
yinlianghui
deleted the
claude/issue-12222-bump-objectui-trailing-and-note
branch
August 25, 2026 17:51
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 freeto 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.
Fixes#12222
What
scripts/bump-objectui.sh's bash-3.2 comment explaining why the ref-collection loop usesif [[ -n "$x" ]]; then …; firather than a trailing[[ … ]] && …attributed the trap tothe empty-list case. Measured on bash 5.2.21, that does not reproduce: an all-empty read
leaves the loop body unexecuted and the
whileexits 0. The real trap is a non-emptyread whose last line fails the test, and only once that loop is the last command of a
function — the
&&-list's false status becomes the loop's exit status, becomes thefunction's return, and
set -ekills the caller on that.The
ifform itself is unchanged — this PR touches only the comment's stated reason, notbehavior.
Scope
Declared file surface: the one comment in
scripts/bump-objectui.sh(lines 341-343 → thecorrected block). Nothing else changed:
local x=''note is untouched (a separate, correctset -upoint).ifform stays exactly as written.of scope per the card.
Verification — the measured mechanism
Constructed all four combinations under
bash --version5.2.21 (set -euo pipefail, loopbody
[[ -n "$x" ]] && arr+=(...)):Only case 3 dies — confirming the corrected comment's claim and refuting the original
empty-list attribution (cases 1 and 2 both exit 0 regardless of loop position).
Gates run (final commit
a4dc82450d)node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackat the final commitnames 8 matched local families for this diff (no STALE TREE warning); all run via the
shared verify lock, all exit 0:
pnpm check:agent-test-spelling— 0pnpm check:cli-command-ids— 0 (✓ check-cli-command-ids: 276 command-id literal(s) … 1 baselined violation(s)— pre-existing baseline entry, unrelated to this diff)pnpm check:cross-package-test-inputs— 0 (All 117 self-test cases passed.)pnpm check:entry-guard— 0 (✓ check:entry-guard: 167 scripts/ file(s) …)pnpm check:parse-guard— 0pnpm check:pnpm-filter-targets— 0 (✓ check:pnpm-filter-targets: 136/173 …)node scripts/check-ci-filter-parity.mjs— 0 (OK: all 96 declared cross-package glob(s) …)node scripts/check-cross-package-test-inputs.mjs— 0Also ran
pnpm check:objectui-changeset(the R7 leg this file touches, per the claimcomment's flagged hazard) — exit 0, self-test line
✓ objectui-range --self-test: all checks passed, R7 line reads✓ #12071 R7 bump-objectui.sh names no bash 4+/5 construct (mapfile, ${x^^}, declare -A, &>>, EPOCH*). The correction is on full-line comments only(no trailing comment on a code line), so R7's
^\s*#exemption applies cleanly.No changeset — this PR publishes nothing (a shell comment correction) —
skip-changesetlabel applied via the read→union→add flow (REST surface closed from this dev seat, #12123).
Generated by Claude Code
Generated by Claude Code