Skip to content

Commit 0056528

Browse files
committed
chore(ci): add lefthook bun.lock drift guard for safe agent automation
1 parent 10b4f5a commit 0056528

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lefthook.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
pre-commit:
22
parallel: true
33
commands:
4+
lockfile-guard:
5+
glob: "{package.json,packages/*/package.json}"
6+
# When a manifest changes, fail fast if bun.lock would change so a frozen
7+
# install in CI (and any AI-agent automation) never breaks on drift.
8+
# --ignore-scripts skips the generate postinstall to stay fast and
9+
# offline. This is a guard, not an auto-fixer, so it never touches the git
10+
# index in parallel with build-and-stage-codegen. To fix: run
11+
# `bun install` then stage bun.lock.
12+
run: |
13+
bun install --frozen-lockfile --ignore-scripts 2>/dev/null \
14+
|| { echo "bun.lock is out of sync with package.json. Run 'bun install' then stage bun.lock."; exit 1; }
415
biome-check:
516
glob: "*.{ts,tsx,js,jsx,json}"
617
# Skip when only deletions or `.d.ts` files are staged. biome refuses an

0 commit comments

Comments
 (0)