Skip to content

fix(ci): keep the bun install retry working on macOS bash 3.2 - #7900

Merged
lidge-jun merged 1 commit into
devfrom
fix/bun-install-bash32-empty-array
Oct 28, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/bun-install-bash32-empty-array

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

#7898 made scripts/ci/bun-install-frozen.sh pass "${retry_args[@]}" to every bun install, starting from an empty array. macOS runners use /bin/bash 3.2, where expanding an empty array under set -u aborts with retry_args[@]: unbound variable, so the very first attempt exits 1. The dev lane=all run 40679924613 failed all seven bun-install-frozen.sh retry policy tests in macos 2/3 and macos control with that message.

The script now keeps the whole install command in a never-empty array: the first attempt runs bun install --frozen-lockfile, and an attempt after a deadline kill runs it with --force, exactly as #7898 intended. Deadlines, the total budget, failure propagation and the no-retry rule for ordinary failures are unchanged.

Verification

  • Red evidence: hosted macOS log of run 40679924613 (macos control, job 122787870441): scripts/ci/bun-install-frozen.sh: line 38: retry_args[@]: unbound variable. Local bash 5.3 does not reproduce the 3.2 behaviour, including under BASH_COMPAT=43, so the green side for macOS is this PR's next lane=all dev run after merge.
  • Local (bash 5.3) with a fake bun: a deadline-killed first attempt is retried as install --frozen-lockfile --force and exits 0; an ordinary failure exits 1 without a retry; bash -n passes.
  • tests/ci-workflows/ci-bun-install-frozen.test.ts is skipped on Windows; it runs in this PR's Ubuntu CI.

NOT RUN: local macOS bash 3.2, full local suite.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (CI script only; no user-facing change.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (No workflow, permission, action-ref or dependency change.)

Summary by CodeRabbit

  • Chores
    • Improved reliability of automated dependency installation in CI, including handling of timed-out installation attempts. This change affects build and verification workflows; it does not add or change end-user functionality.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 28, 2026 11:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T11:59:19.166811Z 796df6e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 508349e and 796df6e.

Files selected for processing: 1
  • scripts/ci/bun-install-frozen.sh

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The install script now stores the Bun frozen-lockfile command in an array. After a timed-out attempt, it replaces the array with a command that includes --force.

Changes: Bun install retry

Layer / File(s) Summary
Initialize and retry install command
scripts/ci/bun-install-frozen.sh
install_dir initializes and invokes install_cmd as an array. After a timed-out attempt, the script replaces it with the frozen-lockfile command plus --force. Retry eligibility and failure handling are unchanged.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: Minimal · up to 796df

The retry script preserves the intended install and timeout-retry behavior without an identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: preserving Bun install retries under macOS Bash 3.2. It matches the script change and the reported unbound-variable failure.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit e7778fe into dev Oct 28, 2026
33 checks passed
@lidge-jun
lidge-jun deleted the fix/bun-install-bash32-empty-array branch October 28, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant