Public: anyone can read this; the crew can change it.

test/scaffold.test.ts passes in the builder's sandbox: the scaffolded app's typecheck and its OpenID sign-in #11058

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Two fixes in `test/scaffold.test.ts` let it pass in the builder's sandbox (#11051). `bun test test/scaffold.test.ts` now passes 6/6 here, `bun x tsc --noEmit` is clean, and `bun scripts/gate.ts` passes. `scripts/gate.ts` is unchanged.

shipped production is serving it deploy 7ab3f87

opened this

Two fixes in test/scaffold.test.ts let it pass in the builder's sandbox (#11051). bun test test/scaffold.test.ts now passes 6/6 here, bun x tsc --noEmit is clean, and bun scripts/gate.ts passes. scripts/gate.ts is unchanged.

  • Writable TMPDIR for every child. Each child process now gets a TMPDIR made inside the test's own temp dir. The first describe makes one scratch dir holding app/ and tmp/, and afterAll deletes it. The "suite leaves its tempdir empty" check (#5326) still uses its own fresh dir, now inside that scratch dir. The sign-in test's app server gets root/tmp.
  • Typecheck runs the forge's own tsc. The test now runs node_modules/typescript/bin/tsc from the forge directly instead of bun x tsc. The ReadOnlyFileSystem error came from bun x, not from TMPDIR: the child was not handed BUN_INSTALL_CACHE_DIR, so it fell back to the read-only ~/.bun cache. Passing the cache dir instead would only have moved the failure: bun x then tried to download TypeScript from the registry and got a refused connection. Running the forge's own tsc needs neither the cache nor the network, and it uses the TypeScript version the forge already pins. The old bun x install-lines caveat (#664) no longer applies.

The OpenID Connect PKCE test passed in this sandbox before and after the change. Its failure did not reproduce here, so it is not skipped and the scaffold source is untouched.

The keep_plan tool the issue asks for is not available in this session, so no plan was posted on the issue.

🤖 Generated with Claude Code

Closes #11051

commented

Two fixes in test/scaffold.test.ts let it pass in the builder's sandbox (#11051). bun test test/scaffold.test.ts now passes 6/6 here, bun x tsc --noEmit is clean, and bun scripts/gate.ts passes. scripts/gate.ts is unchanged.

  • Writable TMPDIR for every child. Each child process now gets a TMPDIR made inside the test's own temp dir. The first describe makes one scratch dir holding app/ and tmp/, and afterAll deletes it. The "suite leaves its tempdir empty" check (#5326) still uses its own fresh dir, now inside that scratch dir. The sign-in test's app server gets root/tmp.
  • Typecheck runs the forge's own tsc. The test now runs node_modules/typescript/bin/tsc from the forge directly instead of bun x tsc. The ReadOnlyFileSystem error came from bun x, not from TMPDIR: the child was not handed BUN_INSTALL_CACHE_DIR, so it fell back to the read-only ~/.bun cache. Passing the cache dir instead would only have moved the failure: bun x then tried to download TypeScript from the registry and got a refused connection. Running the forge's own tsc needs neither the cache nor the network, and it uses the TypeScript version the forge already pins. The old bun x install-lines caveat (#664) no longer applies.

The OpenID Connect PKCE test passed in this sandbox before and after the change. Its failure did not reproduce here, so it is not skipped and the scaffold source is untouched.

The keep_plan tool the issue asks for is not available in this session, so no plan was posted on the issue.

🤖 Generated with Claude Code

Approved

Test-only change, scoped to the issue. Every spawned child (the run helper, the typecheck, the sign-in app server) now gets a TMPDIR made inside the test scratch dir, and the typecheck runs the forge's own node_modules tsc instead of bun x. The scratch dir is removed in afterAll, and scripts/gate.ts is untouched. The change touches no page or terminal door, so the web, TUI and docs checks do not apply. Two things I would do next: (1) the PKCE failure did not reproduce, so if it returns in the builder sandbox, skip it by name in that mode as box 2 allows. (2) Make temp a required parameter in one place only and drop the leftover comment text about the cache, to keep the helper small.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs