Skip to content

fix: batch bun global installs to prevent resolution hang - #1376

Merged
shunkakinoki merged 3 commits into
mainfrom
1372-fix-upgrade-ci
Apr 5, 2026
Merged

fix: batch bun global installs to prevent resolution hang#1376
shunkakinoki merged 3 commits into
mainfrom
1372-fix-upgrade-ci

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Batch bun add --global calls into groups of 10 packages instead of installing all 55 at once
  • bun hangs indefinitely when resolving too many packages in a single global install call
  • Updated tests to reflect the change from bun install --global to batched bun add --global

Test plan

  • shellspec spec/npm_globals_spec.sh passes (17 examples, 0 failures)
  • shellcheck passes on modified script
  • Verified full script completes successfully with batched installs

Summary by cubic

Batched global installs to stop bun from hanging and unblocked upgrade CI by avoiding a dotagents sync collision. Packages now install in groups of 10 with bun add --global, and tests were updated.

  • Bug Fixes
    • Install globals in batches of 10 with bun add --global to prevent resolution hangs.
    • Set DOTAGENTS_SKIP_SYNC=1 to avoid dotagents sync target collision, addressing update scripts #1372.
    • Update specs to check for bun add --global and batching logic.

Written for commit d77dad8. Summary will update on new commits.

bun hangs when resolving too many packages at once in a single
bun add --global call. Install in batches of 10 instead.
@mesa-dot-dev

mesa-dot-dev Bot commented Apr 5, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

Copilot AI review requested due to automatic review settings April 5, 2026 14:57
@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@shunkakinoki has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 9 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 9 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62796d98-530e-4bdf-93e2-888b65e3718e

📥 Commits

Reviewing files that changed from the base of the PR and between 46e41ca and d77dad8.

📒 Files selected for processing (2)
  • home-manager/modules/npm-globals/install-npm-globals.sh
  • spec/npm_globals_spec.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1372-fix-upgrade-ci

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 and usage tips.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 5, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Batched bun add --global calls to prevent resolution hangs and unblocked upgrade CI by avoiding a dotagents sync collision.

What changed?

  • Makefile: Broadened local targets' authority over the dotagents submodule and prevented its synchronization with DOTAGENTS_SKIP_SYNC := 1.
  • dotagents: Updated agent configuration.
  • home-manager/modules/npm-globals/install-npm-globals.sh: Modified to install global npm packages in batches of 10 using bun add --global instead of a single bun install --global command.
  • spec/npm_globals_spec.sh: Updated test suite to use bun add --global and added tests to confirm batching logic with BATCH_SIZE.

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki merged commit 6a9975b into main Apr 5, 2026
4 checks passed
@shunkakinoki
shunkakinoki deleted the 1372-fix-upgrade-ci branch April 5, 2026 14:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR mitigates bun global install hangs by batching global package installs, aligning the Home Manager npm-globals activation script and its ShellSpec coverage with the new behavior.

Changes:

  • Replace a single large bun install --global invocation with batched bun add --global calls (batch size 10) to avoid resolver hangs.
  • Update ShellSpec expectations to assert the new bun command and batching mechanism.
  • Adjust Makefile dotagents integration flags to keep local targets authoritative and skip submodule sync.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spec/npm_globals_spec.sh Updates tests to match batched bun add --global behavior and presence of BATCH_SIZE.
Makefile Tweaks dotagents include behavior by adding DOTAGENTS_SKIP_SYNC and updating the related comment.
home-manager/modules/npm-globals/install-npm-globals.sh Implements batched global installs via a bash array and loop to prevent bun resolution hangs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the dotagents subproject and modifies the Makefile to skip synchronization. The primary change is in the install-npm-globals.sh script, where global package installation is now processed in batches of 10 using bun add --global to mitigate issues where bun hangs during large dependency resolutions. Test specifications have been updated to reflect these changes. I have no feedback to provide.

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.

2 participants