Observed problem
At main 1b07917, the exact TypeScript conformance test with HOME_TS_CONFORMANCE_START=0 and HOME_TS_CONFORMANCE_LIMIT=1 passes 1/1 on pinned Zig 0.17 and Zig 0.18, but the cached 0.17 test execution takes about two minutes for the single ts-expect-error-js fixture. The next window, START=1 LIMIT=1, reached a 240-second wall bound on 0.17 without a terminal aggregate. Both runs used run_bounded, HOME_RUN_MAX_MB=3840, and -j1; the timeout is not a passing result. The passing case peaked at 352 MB of process-tree footprint, so memory exhaustion was not the observed cause.
The fixture has one virtual JS file and no import graph. After #841 corrected mixed-case @fileName parsing, it correctly routes through runProgram and matches the exact upstream diagnostic. The program path is therefore necessary to investigate; returning to the old concatenated-source path would reintroduce the filename defect and is not an acceptable fix.
Work to do
- Profile the stages of runProgram and ts_program.loadImportClosure on this pinned fixture, using guarded serial runs.
- Remove redundant work or improve the underlying compiler/library/graph operation without skipping checks, replacing results, or weakening exact baseline comparisons.
- Verify the same pinned exact fixture remains 1/1 on both Zig versions, establish a repeatable timing comparison, and retry START=1 LIMIT=1 under the 3840 MB cap.
- Keep #841 and #832 informed. Full-corpus parity remains tracked by #66.
Evidence: docs/docs/bun-port-evidence/2026-10-17-ts-virtual-filename-case/README.md. The previous START=0 LIMIT=5 attempt timed out at 240 seconds and must not be credited.