Scope
Finish native admission of js/node/worker_threads/worker_threads.test.ts without changing the upstream test, fixture workload, or five-second deadline.
This supersedes the remaining Debug timing boundary recorded in #482.
Root cause
The bundler ParseTask already recognizes arbitrarily large whitespace-only JavaScript as an empty module. The runtime transpiler only applied that contract to sources shorter than 33 bytes, so the worker eval/Blob path sent each 100 MiB whitespace-only virtual source through the full JavaScript parser.
Required implementation
- Apply the same empty-module contract to runtime eval, stdin, data, and Blob virtual sources.
- Keep the canonical ASCII-whitespace predicate exact and make its scan efficient in Debug as well as optimized builds.
- Add boundary coverage across vector blocks and mixed ASCII whitespace.
- Promote the complete dedicated worker test directories only after the unchanged suite passes natively.
Evidence
Before the fix:
- Home Debug: 33 pass / 1 timeout at the original five-second deadline.
- The six-worker leak fixture took about 11.03 s.
- Pinned Bun
4982b91e3702094330f3be3883354c52b8c01323: 34/34 in 1.269 s.
After the general runtime fix:
- Home Debug strict native: 34/34 in 4.079 s.
- Home ReleaseSafe strict native: 34/34 in 1.066 s.
- Complete 75-file worker aggregate (17 dedicated tests + 58 Node parallel scripts), Debug and ReleaseSafe: 356 pass / 4 upstream TODO-skips / 0 fail / 0 unsupported.
- Runtime units: 1,817 pass / 19 skip / 0 fail.
No upstream assertion, fixture workload, or deadline is changed.