bake: validate app.bundlerOptions and its server/client/ssr fields are objects#30638
Closed
robobun wants to merge 2 commits into
Closed
bake: validate app.bundlerOptions and its server/client/ssr fields are objects#30638robobun wants to merge 2 commits into
robobun wants to merge 2 commits into
Claude / Claude Code Review
completed
May 13, 2026 in 19m 53s
Code review found 1 important issue
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/bake/bake.zig:211-213 |
minify: false still triggers same debugAssert crash |
| 🟡 Nit | test/bake/app-options-validation.test.ts:4-11 |
Test will fail on non-canary release builds (bake feature flag not set in-process) |
Annotations
Check failure on line 213 in src/bake/bake.zig
claude / Claude Code Review
minify: false still triggers same debugAssert crash
The new `isObject()` guard fixes the crash for `server`/`client`/`ssr`, but the same `debugAssert(target.isObject())` crash still exists ~15 lines below for the `minify` field. With `minify: false` (or any non-boolean non-object like `minify: 5`), the `isBoolean() and asBoolean()` guard evaluates to false and falls through to `minify_options.getBooleanLoose(global, "whitespace")`, which calls `.get()` on a non-object and trips the same assertion. Since this PR's goal is eliminating this crash cl
Check warning on line 11 in test/bake/app-options-validation.test.ts
claude / Claude Code Review
Test will fail on non-canary release builds (bake feature flag not set in-process)
This test calls `Bun.serve({ app: ... })` directly in the test process, but the `app` option is gated behind `bun.FeatureFlags.bake()` (`is_canary || isDebug || BUN_FEATURE_FLAG_EXPERIMENTAL_BAKE`). The CI test runner (`scripts/runner.node.mjs`) doesn't set `BUN_FEATURE_FLAG_EXPERIMENTAL_BAKE` on the test process — only `bunEnv` from `test/harness.ts` sets it for spawned subprocesses — so on non-canary release builds (`.buildkite/ci.mjs` sets `canary=0` for `RELEASE`/`[release]` runs), `ServerCo
Loading