fix(ci): replace bunx with bun x so typecheck and lint always run #136

Merged
code-lead merged 2 commits from dev/130 into main 2026-04-20 12:16:22 +00:00
Collaborator

Summary

  • Replaces all bunx calls in justfile and package.json scripts with bun x
  • bunx is not available in all bun installations (e.g. when installed via npm install -g bun or from a binary that doesn't create the bunx symlink); bun x is always present as part of the bun binary itself
  • This was causing just typecheck to fail at the shell level before TypeScript even ran, producing the TS2307: Cannot find module 'happy-dom' and TS18046: 'el' is of type 'unknown' cascade errors
  • happy-dom itself is correctly declared in devDependencies and bun.lock (added in PR #121); after this fix bun x tsc --noEmit resolves it without errors

Test plan

  • bun x tsc --noEmit exits 0
  • bun x biome check src/ exits 0
  • bun x biome format src/ exits 0 (no changes)
  • bun test src/dashboard-browser.test.ts → 13 pass, 0 fail

Closes #130

🤖 Generated with Claude Code

## Summary - Replaces all `bunx` calls in `justfile` and `package.json` scripts with `bun x` - `bunx` is not available in all bun installations (e.g. when installed via `npm install -g bun` or from a binary that doesn't create the `bunx` symlink); `bun x` is always present as part of the `bun` binary itself - This was causing `just typecheck` to fail at the shell level before TypeScript even ran, producing the `TS2307: Cannot find module 'happy-dom'` and `TS18046: 'el' is of type 'unknown'` cascade errors - `happy-dom` itself is correctly declared in `devDependencies` and `bun.lock` (added in PR #121); after this fix `bun x tsc --noEmit` resolves it without errors ## Test plan - [x] `bun x tsc --noEmit` exits 0 - [x] `bun x biome check src/` exits 0 - [x] `bun x biome format src/` exits 0 (no changes) - [x] `bun test src/dashboard-browser.test.ts` → 13 pass, 0 fail Closes #130 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): replace bunx with bun x so typecheck and lint run on plain bun installs
All checks were successful
qa / qa (pull_request) Successful in 3m2s
qa / dockerfile (pull_request) Successful in 9s
48ff0e0242
bunx is not available in all bun installations (e.g. when installed via
npm install -g bun or from binary without the bunx symlink). All justfile
recipes and package.json scripts now use `bun x <pkg>` which is always
available as part of the bun binary itself.

This unblocks `just typecheck` / `just qa` in CI and fixes the
TS2307 / TS18046 cascade that appeared when the tsc invocation failed
before TypeScript could even resolve the happy-dom import.

Closes #130

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-20 11:55:58 +00:00
reviewer requested changes 2026-04-20 12:00:51 +00:00
Dismissed
reviewer left a comment

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes.

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes.
chore: re-trigger CI (green run — reviewer asked to wait for completion)
All checks were successful
qa / qa (pull_request) Successful in 3m3s
qa / dockerfile (pull_request) Successful in 11s
c7db155432
dev requested review from reviewer 2026-04-20 12:06:21 +00:00
reviewer requested changes 2026-04-20 12:10:45 +00:00
Dismissed
reviewer left a comment

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes.


Preliminary code review (ready to approve once CI is green):

The change is correct and well-scoped. bun x is the reliable form of the command (built into the bun binary itself); bunx is a convenience symlink that is not created in all installation paths (notably npm install -g bun). Replacing all five occurrences in both justfile and package.json is the right approach — consistent and complete.

Acceptance criteria check against issue #130:

AC Status
tsc --noEmit exits 0 claimed in test plan; plausible root-cause fix
happy-dom correctly declared already in devDependencies, no change needed
el is of type unknown error fixed cascade from happy-dom types not loading; once bun x tsc resolves the package correctly, querySelector returns proper DOM types and the error disappears
bun test src/dashboard-browser.test.ts passes claimed in test plan (13 pass)
just qa exits 0 follows from above

No logic bugs, no unhandled errors, no security issues, no scope creep. Waiting on CI green to confirm the fix holds in the runner environment.

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes. --- **Preliminary code review** (ready to approve once CI is green): The change is correct and well-scoped. `bun x` is the reliable form of the command (built into the `bun` binary itself); `bunx` is a convenience symlink that is not created in all installation paths (notably `npm install -g bun`). Replacing all five occurrences in both `justfile` and `package.json` is the right approach — consistent and complete. **Acceptance criteria check against issue #130:** | AC | Status | |---|---| | `tsc --noEmit` exits 0 | claimed in test plan; plausible root-cause fix | | `happy-dom` correctly declared | already in `devDependencies`, no change needed | | `el is of type unknown` error fixed | cascade from `happy-dom` types not loading; once `bun x tsc` resolves the package correctly, `querySelector` returns proper DOM types and the error disappears | | `bun test src/dashboard-browser.test.ts` passes | claimed in test plan (13 pass) | | `just qa` exits 0 | follows from above | No logic bugs, no unhandled errors, no security issues, no scope creep. Waiting on CI green to confirm the fix holds in the runner environment.
reviewer left a comment

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes.


Preliminary code review (ready to approve once CI is green):

The change is correct and well-scoped. bun x is the reliable form of the command (built into the bun binary itself); bunx is a convenience symlink that is not created in all installation paths (notably npm install -g bun). Replacing all five occurrences in both justfile and package.json is the right approach — consistent and complete.

Acceptance criteria check against issue #130:

AC Status
tsc --noEmit exits 0 claimed in test plan; plausible root-cause fix
happy-dom correctly declared already in devDependencies, no change needed
el is of type unknown error fixed cascade from happy-dom types not loading; once bun x tsc resolves the package correctly, querySelector returns proper DOM types and the error disappears
bun test src/dashboard-browser.test.ts passes claimed in test plan (13 pass)
just qa exits 0 follows from above

No logic bugs, no unhandled errors, no security issues, no scope creep. Waiting on CI green to confirm the fix holds in the runner environment.

CI was still running at review time — push any trivial change (or wait) and I will re-review when it completes. --- **Preliminary code review** (ready to approve once CI is green): The change is correct and well-scoped. `bun x` is the reliable form of the command (built into the `bun` binary itself); `bunx` is a convenience symlink that is not created in all installation paths (notably `npm install -g bun`). Replacing all five occurrences in both `justfile` and `package.json` is the right approach — consistent and complete. **Acceptance criteria check against issue #130:** | AC | Status | |---|---| | `tsc --noEmit` exits 0 | claimed in test plan; plausible root-cause fix | | `happy-dom` correctly declared | already in `devDependencies`, no change needed | | `el is of type unknown` error fixed | cascade from `happy-dom` types not loading; once `bun x tsc` resolves the package correctly, `querySelector` returns proper DOM types and the error disappears | | `bun test src/dashboard-browser.test.ts` passes | claimed in test plan (13 pass) | | `just qa` exits 0 | follows from above | No logic bugs, no unhandled errors, no security issues, no scope creep. Waiting on CI green to confirm the fix holds in the runner environment.
Author
Collaborator

🛑 Review loop capped — operator input needed

The reviewer (reviewer) has submitted 3 REQUEST_CHANGES rounds on this PR; the address-review auto-dispatch to dev is now halted to avoid a runaway cycle.

Options

  • Merge as-is if the remaining findings are nits — the earlier rounds already landed the real fixes.
  • Force-approve by submitting an APPROVED review yourself (the webhook treats a human approval as the terminal state and dispatches merge).
  • Close + re-open the PR to reset the round counter if you genuinely want another cycle.
  • Take over the branch and push the final fix manually.

Rationale

Each round costs ~5 min × 2 agents × 1M-context, and past round 3 the findings are usually nitpick spiral or reviewer non-determinism rather than real correctness issues. See the full design in src/review-loop.ts.

cc @charles — cap is MAX_ROUNDS=3 in src/review-loop.ts; bump it there if you want more auto-rounds.

## 🛑 Review loop capped — operator input needed The reviewer (`reviewer`) has submitted **3 REQUEST_CHANGES rounds** on this PR; the address-review auto-dispatch to `dev` is now halted to avoid a runaway cycle. ### Options - **Merge as-is** if the remaining findings are nits — the earlier rounds already landed the real fixes. - **Force-approve** by submitting an `APPROVED` review yourself (the webhook treats a human approval as the terminal state and dispatches merge). - **Close + re-open** the PR to reset the round counter if you genuinely want another cycle. - **Take over the branch** and push the final fix manually. ### Rationale Each round costs ~5 min × 2 agents × 1M-context, and past round 3 the findings are usually nitpick spiral or reviewer non-determinism rather than real correctness issues. See the full design in `src/review-loop.ts`. _cc @charles — cap is `MAX_ROUNDS=3` in `src/review-loop.ts`; bump it there if you want more auto-rounds._
Author
Collaborator

CI is now green on the latest commit (c7db155). All three REQUEST_CHANGES rounds from the reviewer were solely "CI still running at review time — wait for green"; the code itself was approved in each review body.

The auto-dispatch loop hit the MAX_ROUNDS=3 cap. Ready to merge once @charles approves.

CI is now green on the latest commit (`c7db155`). All three REQUEST_CHANGES rounds from the reviewer were solely "CI still running at review time — wait for green"; the code itself was approved in each review body. The auto-dispatch loop hit the MAX_ROUNDS=3 cap. Ready to merge once @charles approves.
reviewer approved these changes 2026-04-20 12:15:10 +00:00
reviewer left a comment

APPROVED

CI is green on c7db155 (3m15s, success). My prior three REQUEST_CHANGES were solely "CI still running — wait for completion"; the code itself has been correct throughout.

Acceptance criteria check

Criterion Status
bun x tsc --noEmit exits 0 CI green confirms
happy-dom in devDependencies present in package.json
TS18046: el is of type unknown fixed cascade from missing happy-dom types; resolves with bun x
No as any cast fix is toolchain-only
bun test src/dashboard-browser.test.ts passes 13 pass per PR body; CI confirms
just qa exits 0 CI green

Code review

Minimal, correct diff: 5 bunxbun x substitutions in justfile and 5 in package.json scripts. No logic changes, no scope creep.

Root-cause analysis is sound: bun x is always available as a built-in subcommand of the bun binary, whereas bunx is a standalone symlink that may not be present when bun is installed via npm install -g bun (the CI setup path in ci-setup). Shell failure before TSC ran produced the reported TS error cascade.

Ready to merge.

## ✅ APPROVED CI is green on `c7db155` (3m15s, success). My prior three REQUEST_CHANGES were solely "CI still running — wait for completion"; the code itself has been correct throughout. ### Acceptance criteria check | Criterion | Status | |---|---| | `bun x tsc --noEmit` exits 0 | ✅ CI green confirms | | `happy-dom` in devDependencies | ✅ present in package.json | | `TS18046: el is of type unknown` fixed | ✅ cascade from missing happy-dom types; resolves with `bun x` | | No `as any` cast | ✅ fix is toolchain-only | | `bun test src/dashboard-browser.test.ts` passes | ✅ 13 pass per PR body; CI confirms | | `just qa` exits 0 | ✅ CI green | ### Code review Minimal, correct diff: 5 `bunx` → `bun x` substitutions in `justfile` and 5 in `package.json` scripts. No logic changes, no scope creep. Root-cause analysis is sound: `bun x` is always available as a built-in subcommand of the `bun` binary, whereas `bunx` is a standalone symlink that may not be present when bun is installed via `npm install -g bun` (the CI setup path in `ci-setup`). Shell failure before TSC ran produced the reported TS error cascade. Ready to merge.
reviewer approved these changes 2026-04-20 12:15:35 +00:00
reviewer left a comment

APPROVED

CI is green on c7db155 (3m15s, success). My prior three REQUEST_CHANGES were solely "CI still running — wait for completion"; the code itself has been correct throughout.

Acceptance criteria check

Criterion Status
bun x tsc --noEmit exits 0 CI green confirms
happy-dom in devDependencies present in package.json
TS18046: el is of type unknown fixed cascade from missing happy-dom types; resolves with bun x
No as any cast fix is toolchain-only
bun test src/dashboard-browser.test.ts passes 13 pass per PR body; CI confirms
just qa exits 0 CI green

Code review

Minimal, correct diff: 5 bunxbun x substitutions in justfile and 5 in package.json scripts. No logic changes, no scope creep.

Root-cause analysis is sound: bun x is always available as a built-in subcommand of the bun binary, whereas bunx is a standalone symlink that may not be present when bun is installed via npm install -g bun (the CI setup path in ci-setup). Shell failure before TSC ran produced the reported TS error cascade.

Ready to merge.

## ✅ APPROVED CI is green on `c7db155` (3m15s, success). My prior three REQUEST_CHANGES were solely "CI still running — wait for completion"; the code itself has been correct throughout. ### Acceptance criteria check | Criterion | Status | |---|---| | `bun x tsc --noEmit` exits 0 | ✅ CI green confirms | | `happy-dom` in devDependencies | ✅ present in package.json | | `TS18046: el is of type unknown` fixed | ✅ cascade from missing happy-dom types; resolves with `bun x` | | No `as any` cast | ✅ fix is toolchain-only | | `bun test src/dashboard-browser.test.ts` passes | ✅ 13 pass per PR body; CI confirms | | `just qa` exits 0 | ✅ CI green | ### Code review Minimal, correct diff: 5 `bunx` → `bun x` substitutions in `justfile` and 5 in `package.json` scripts. No logic changes, no scope creep. Root-cause analysis is sound: `bun x` is always available as a built-in subcommand of the `bun` binary, whereas `bunx` is a standalone symlink that may not be present when bun is installed via `npm install -g bun` (the CI setup path in `ci-setup`). Shell failure before TSC ran produced the reported TS error cascade. Ready to merge.
code-lead deleted branch dev/130 2026-04-20 12:16:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!136
No description provided.