Skip to content

build: type-check with bun check - #180

Merged
bompus merged 1 commit into
mainfrom
typecheck-bun-check
Oct 19, 2026
Merged

bompus merged 1 commit into
mainfrom
typecheck-bun-check

Conversation

@bompus

@bompus bompus commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

`typecheck` now runs Bun's built-in `bun check` instead of `tsc --noEmit`, and `check` calls `bun run typecheck`. On this repository `bun check` ran in 0.08 s against 0.17 s for `tsc` 7.0.2 (median of 5 runs) and reported the same 831 errors with three extra strict flags added; the measurements and their limits are in bompus/chief-of-staff#458.

  • A `check` script in `package.json` shadows the built-in, so `scripts/typecheck.ts` spawns `bun check -p /tsconfig.json` from the temporary directory. A script, rather than a shell one-liner, because CI also runs `bun run check` on Windows.
  • `bun check` first shipped in Bun 1.4.3, so CI moves from Bun 1.4.2 to 1.4.3 in both jobs, and the README says contributors need 1.4.3 or later for `bun run check`. The runtime requirement (`engines.bun`, 1.4.2) is unchanged, and CONTRIBUTING now says the Glama build spec follows that, not CI's Bun.
  • Verified on Linux: `bun run typecheck` exits 0, a deliberate type error makes it exit 1, and it works from any directory. Windows is verified by this pull request's CI run.

A reviewer subagent read the change and found no blockers; its findings (repo-root path, the CONTRIBUTING rule) are fixed. No other open or closed pull request covers this.


Summary by cubic

Switches typechecking from tsc --noEmit to Bun's built-in bun check, which runs in 0.08s instead of 0.17s and reports the same 831 errors.

  • typecheck now runs scripts/typecheck.ts, which spawns bun check from a temporary directory because the package.json check script shadows the built-in.
  • CI moves to Bun 1.4.3, the first release with bun check; contributors need 1.4.3+ to run bun run check.
  • The runtime requirement (engines.bun at 1.4.2) is unchanged, and CONTRIBUTING now ties the Glama build spec to that instead of CI's Bun.

Written for commit 7d8781d. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Development
    • Type checking now uses Bun’s built-in checker and requires Bun 1.4.3 or later.
  • Chores
    • Updated CI to use Bun 1.4.3.
    • Clarified when to update the saved Glama build specification.

typecheck runs the built-in from the temporary directory with an absolute project
path (scripts/typecheck.ts), because the package.json check script shadows it and
CI also runs on Windows. CI moves from Bun 1.4.2 to 1.4.3, the first release with
bun check; the README notes the requirement for contributors.
@bompus

bompus commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bompus has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: faa465cf-c832-4ee6-acf3-76eb2f3855df
📥 Commits

Reviewing files that changed from the base of the PR and between 5ce7285 and 7d8781d.

📒 Files selected for processing: 5
  • .github/workflows/ci.yml
  • CONTRIBUTING.md
  • README.md
  • package.json
  • scripts/typecheck.ts

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

📝 Walkthrough

The typecheck scripts now use Bun’s built-in check command. CI installs Bun 1.4.3, and the README and contribution guidance describe the typecheck version separately from the server’s Bun requirement.

Changes: Bun Typecheck Migration

Layer / File(s) Summary
Route type checking through Bun
package.json, scripts/typecheck.ts
The typecheck script runs the new Bun typecheck script, and check invokes typecheck. The new script runs Bun’s built-in check with the project tsconfig.json and exits with the subprocess’s code.
Align CI and documentation with Bun 1.4.3
.github/workflows/ci.yml, README.md, CONTRIBUTING.md
The CI check jobs install Bun 1.4.3. The README states that type checking requires Bun 1.4.3 or later. The contribution guidance distinguishes CI’s Bun version from the version required by the server.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7d878

Type checking now uses Bun’s built-in checker, and CI uses Bun 1.4.3. No actionable current-head defect is established, so no merge-blocking risk is identified.

Security architecture risk: 🔵 Low · up to 7d878

The change is confined to developer and CI type checking, without an identified increase in permissions or production exposure. The executable and project configuration are explicitly selected, but command resolution from the temporary working directory remains unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed execution path runs with the invoking developer or CI process's authority. The inspected integration does not add a production server caller or a higher-privilege CI job.

Trust Boundaries and Controls

  • inferred — The fixed executable avoids PATH-based executable selection, and the absolute project argument fixes the primary configuration target. The temporary cwd remains an ambient lookup boundary: the wrapper documents package-script shadowing, but the available evidence does not establish whether attacker-controlled metadata there can redirect Bun 1.4.3's check command.

Hardening Proposals

  • proposed — Consider using a newly created private, empty working directory with reliable cleanup rather than the ambient temporary-directory root, reducing dependence on unrelated package metadata. This is precautionary hardening, not a verified exploit finding.
Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: replacing TypeScript type checking with Bun's built-in check.
Description check Passed The description is detailed, relevant, and explains the implementation, CI changes, runtime requirements, verification steps, and performance results. It does not reproduce the template checkboxes, bu…
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.
Suppressions Explained Passed PASS. The pull request changes only CI Bun versions, documentation, package scripts, and adds scripts/typecheck.ts. No changed line adds or broadens a lint, type-check, or formatter suppression dire…
Interface Changes Documented Passed The pull request changes Bun versions, documentation, package scripts, and adds scripts/typecheck.ts. It does not add, remove, or rename an MCP tool or argument, a swarmail command or flag, or an …
Full details: Description check

Explanation

The description is detailed, relevant, and explains the implementation, CI changes, runtime requirements, verification steps, and performance results. It does not reproduce the template checkboxes, but it provides the required information and is mostly complete.

Full details: Suppressions Explained

Explanation

PASS. The pull request changes only CI Bun versions, documentation, package scripts, and adds scripts/typecheck.ts. No changed line adds or broadens a lint, type-check, or formatter suppression directive or ignore entry. Existing items such as tsconfig.json skipLibCheck and oxlint-disable-next-line are outside the pull-request diff.

Full details: Interface Changes Documented

Explanation

The pull request changes Bun versions, documentation, package scripts, and adds scripts/typecheck.ts. It does not add, remove, or rename an MCP tool or argument, a swarmail command or flag, or an environment variable. The documentation and changelog requirement is therefore not triggered.

✨ Finishing Touches
📝 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.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@bompus
bompus merged commit 408436a into main Oct 19, 2026
4 checks passed
@bompus
bompus deleted the typecheck-bun-check branch October 19, 2026 18:48
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.

1 participant