Skip to content

Commit 8410aed

Browse files
authored
🤖 fix: pin Bun and freeze installs to avoid lock churn (#3072)
## Summary Pin Bun 1.3.5 in the repo manifests and switch the install entrypoints that previously rewrote lockfiles to `--frozen-lockfile`. This makes Bun version expectations explicit across the main app, mobile app, and chat-components package while stopping local validation and publish automation from silently mutating `bun.lock`. ## Background This repo already pins Bun 1.3.5 in the main CI setup action, but several other entrypoints were still effectively unpinned or running mutable installs. That let validation on machines with a different Bun setup rewrite lockfiles even when no dependency change was intended. ## Implementation - added `packageManager: "bun@1.3.5"` to the root, mobile, and chat-components manifests - changed the root/mobile Makefile install sentinels to run `bun install --frozen-lockfile` - updated the chat-components publish workflow to use `bun install --frozen-lockfile` - pinned the auto-cleanup workflows to Bun 1.3.5 to match the existing shared setup action - regenerated the synced GitHub Actions guide and built-in docs snapshot that mirror the auto-cleanup workflow ## Validation - `make static-check` - `cd mobile && bun install --frozen-lockfile` - `cd packages/chat-components && bun install --frozen-lockfile` - `make lint-actions` ## Risks Low. The main behavior change is that Bun version mismatches or stale lockfiles now fail fast instead of being normalized implicitly during install. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$2.29`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=2.29 -->
1 parent 0e91588 commit 8410aed

9 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/_npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ jobs:
228228
229229
- name: Install chat-components deps
230230
working-directory: packages/chat-components
231-
run: bun install
231+
run: bun install --frozen-lockfile
232232

233233
- name: Build chat-components package
234234
working-directory: packages/chat-components

.github/workflows/auto-cleanup-fixup.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
7474
- uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
7575
if: ${{ steps.precheck.outputs.enabled == 'true' }}
76+
with:
77+
bun-version: 1.3.5
7678

7779
# Pin the git identity so the AI agent doesn't invent its own.
7880
- name: Configure git identity

.github/workflows/auto-cleanup.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
token: ${{ steps.app-token.outputs.token }}
5353
- uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
5454
if: ${{ steps.precheck.outputs.enabled == 'true' }}
55+
with:
56+
bun-version: 1.3.5
5557

5658
# Pin the git identity so the AI agent doesn't invent its own.
5759
# Without this, commits end up as "mux-auto-cleanup[bot]" while the

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,15 @@ all: build
108108
# Sentinel file to track when dependencies are installed
109109
# Depends on package.json and bun.lock - rebuilds if either changes
110110
node_modules/.installed: package.json bun.lock
111-
@echo "Dependencies out of date or missing, running bun install..."
112-
@bun install
111+
@echo "Dependencies out of date or missing, running bun install --frozen-lockfile..."
112+
@# Keep local validation from silently rewriting bun.lock when a different Bun version is installed.
113+
@bun install --frozen-lockfile
113114
@touch node_modules/.installed
114115

115116
# Mobile dependencies - separate from main project
116117
mobile/node_modules/.installed: mobile/package.json mobile/bun.lock
117-
@echo "Installing mobile dependencies..."
118-
@cd mobile && bun install
118+
@echo "Installing mobile dependencies with bun install --frozen-lockfile..."
119+
@cd mobile && bun install --frozen-lockfile
119120
@touch mobile/node_modules/.installed
120121

121122
# Legacy target for backwards compatibility

docs/guides/github-actions.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
token: ${{ steps.app-token.outputs.token }}
9898
- uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
9999
if: ${{ steps.precheck.outputs.enabled == 'true' }}
100+
with:
101+
bun-version: 1.3.5
100102
101103
# Pin the git identity so the AI agent doesn't invent its own.
102104
# Without this, commits end up as "mux-auto-cleanup[bot]" while the

mobile/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.0.1",
55
"description": "Expo app for mux (connects to mux server over HTTP/WS)",
6+
"packageManager": "bun@1.3.5",
67
"main": "expo-router/entry",
78
"scripts": {
89
"start": "expo start",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"publishConfig": {
1616
"access": "public"
1717
},
18+
"packageManager": "bun@1.3.5",
1819
"scripts": {
1920
"dev": "make dev",
2021
"prebuild:main": "./scripts/generate-version.sh",

packages/chat-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@coder/mux-chat-components",
33
"version": "0.1.0",
44
"description": "Shared chat components for Mux conversation rendering",
5+
"packageManager": "bun@1.3.5",
56
"type": "module",
67
"main": "./dist/index.js",
78
"types": "./dist/index.d.ts",

src/node/services/agentSkills/builtInSkillContent.generated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3931,6 +3931,8 @@ export const BUILTIN_SKILL_FILES: Record<string, Record<string, string>> = {
39313931
" token: ${{ steps.app-token.outputs.token }}",
39323932
" - uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0",
39333933
" if: ${{ steps.precheck.outputs.enabled == 'true' }}",
3934+
" with:",
3935+
" bun-version: 1.3.5",
39343936
"",
39353937
" # Pin the git identity so the AI agent doesn't invent its own.",
39363938
' # Without this, commits end up as "mux-auto-cleanup[bot]" while the',

0 commit comments

Comments
 (0)