You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for the remaining work to reach 100% parity with Bun's official test suite (~/Code/bun, pinned SHA fd0b6f1a27), runnable here via home test. Each item has the root cause traced during investigation. We tackle them top-to-bottom; check off as landed (small fix:/feat: commits, pushed).
Test: cd /tmp/bun-pinned && home test test/js/... (run files sequentially with a pkill -9 -f zig-out/bin/home between them — parallel runs cause resource-exhaustion false hangs).
getCipher() cluster works — was a false diagnosis: the null cipher/session came from the broken (cert-less) handshake caused by the Buffer-cert gap, now fixed (b3492d3). Verified locally: getCipher {TLS_AES_128_GCM_SHA256, version:"TLSv1/SSLv3"} (matches pin test), getProtocol TLSv1.3, getSession 1106-byte Buffer, getEphemeralKeyInfo/getSharedSigalgs/exportKeyingMaterial/isSessionReused all correct. The pin test connects to bun.sh (crashes on this macOS 27 box) so it can't be run here, but the behavior is confirmed.
getPeerCertificate at pin parity — abbreviated works (17 keys, CN populated); earlier {} was a test error (called with false→ the non-abbreviated path). The detailed/issuerCertificate-chain path is a literal TODO at tls_socket_functions.zig:149 — identical in the pin, so pin tests needing it fail there too (not a Home gap).
ALPN — fixed in 428aa2c (hand-mirror SSLConfig.fromJS never parsed ALPNProtocols).
SNI server.addContext() — fixed in 4ed9a49. The hand-mirror read only serverName, not its servername altName (which node:tls passes), so the client sent no SNI → server context selection never matched. Isolated addContext test now passes (context1/context2 authorize via their CA, unknowncontext falls back). Remaining node-tls-context failures are the file's external-connecting tests (machine's TLS-network crash).
Cert-chain verification — "unable to verify the first certificate" / "unable to get issuer certificate" on incomplete-chain + intermediate-CA scenarios (basic single-CA verify works).
Config validation — tls.createServer({passphrase: wrong}) should reject but listens; passphrase IS passed to us_ssl_ctx_from_options, so it's uws-level validation timing/error-surfacing.
B. Bun Shell ($) — (parallel agent landing corpus tests)
**$\cmd` segfaults** in the interpreter execution-completion microtask (get_by_idon null); construction + parse work, the completion callback derefs a null/freed object. ~11bun/shell` files.
C. fetch / HTTP client
redirect + gzip — fixed in c508e00 (NativePromiseContext wiring; see below). fetch-gzip.test.ts 2/3 → 5/0.
streamed gzip with delay — fixed in c508e00 (same root).
body-stream.test.ts — the hang is fixed by c508e00; remaining failures now fail fast and are a separate request-body-stream clone bug (reader (clone) + force ReadableStream conversion).
Bake/HMR — parked; ClientFile.Packed size invariant relaxed for release ([df83921]).
Worker MessageChannel/BroadcastChannel edge cases — core cross-thread now works (dcb6db6); verify remaining worker tests.
F. Memory-leak tests (triaged on ReleaseSafe 2026-07-07 — build target un-rotted in 55f7140)
setTimeout-clear-in-callback — ✅ FALSE ALARM: all 3 variants (clear/refresh/repeat) pass on ReleaseSafe; debug-build overhead as suspected.
text-decoder utf16le output-buffer leak — ✅ FALSE ALARM: both utf-16le and utf-16be pass on ReleaseSafe.
streams-leak — ✅ FALSE ALARM: passes on ReleaseSafe.
serve-body-leak — ✅ CLOSED (4ee746c): root cause was the libc mimalloc shim (allocator page retention, not a leak — see forensics comment). Real mimalloc re-attached (Phase 12.2); 7 pass / 0 fail on ReleaseSafe.
inspect-error-leak — ✅ CLOSED (4ff003d): ZigException.Holder.deinit was a stub that dropped the pin's deferred resetArena — every inspected error left one full transpile in the module loader arena (74MB/100k iters). Now passes with 'RSS increased by 4 MB', exactly real Bun's number.
node:util test-aborted gc-cleanup — ✅ CLOSED (d459e0d): FinalizationRegistry callbacks never fired AT ALL — JSCScheduler.zig was a no-op placeholder and the two event-loop exports were noop stubs, severing JSC's DeferredWorkTimer delivery chain. Pin's scheduler ported; test-aborted now 5/5 (gc-cleanup passes in 2.5ms).
(new) HTMLRewriter handler leak — reclassified, NOT a leak: all 58 lol_html_* symbols are noop stubs (lol-html Rust crate unported — link_bun_rust_archive = false); the child panics on the first .on() (else => unreachable on a garbage return at lolhtml_sys/lol_html.zig:253) and the test fails on stderr. Belongs with section E as an unported-library item: link lol_html_c_api (rlibs exist in the Bun build tree), delete the stubs, and restore the pin's HTMLString.toString free (lol_html.zig:623 — latent leak once real lolhtml links).
G. Environmental / infra (mostly resolved)
Test runner: home test defaults to native bun:test runner (078c659)
bun:internal-for-testing gated in release (13deb08)
node v24 + bun v1.3.14 installed via pantry (clears differential-spawn "node not found" failures)
Build recovery recipe after /tmp wipe (memory: home-build-portability.md)
Tracking issue for the remaining work to reach 100% parity with Bun's official test suite (
~/Code/bun, pinned SHAfd0b6f1a27), runnable here viahome test. Each item has the root cause traced during investigation. We tackle them top-to-bottom; check off as landed (smallfix:/feat:commits, pushed).How to run / verify
HOME_BUN_OBJ_ROOT=/tmp/bun-pinned/build/release/obj HOME_BUN_WEBKIT_LIB=~/.bun/build-cache/webkit-5488984d20e0dbfe-arm64/lib ./pantry/.bin/zig buildcd /tmp/bun-pinned && home test test/js/...(run files sequentially with apkill -9 -f zig-out/bin/homebetween them — parallel runs cause resource-exhaustion false hangs).-Doptimize=ReleaseSafe) clears debug-assert crashes and gives honest leak numbers.A. node:tls socket layer
getCipher()cluster works — was a false diagnosis: the null cipher/session came from the broken (cert-less) handshake caused by the Buffer-cert gap, now fixed (b3492d3). Verified locally: getCipher{TLS_AES_128_GCM_SHA256, version:"TLSv1/SSLv3"}(matches pin test), getProtocolTLSv1.3, getSession 1106-byte Buffer, getEphemeralKeyInfo/getSharedSigalgs/exportKeyingMaterial/isSessionReused all correct. The pin test connects to bun.sh (crashes on this macOS 27 box) so it can't be run here, but the behavior is confirmed.getPeerCertificateat pin parity — abbreviated works (17 keys, CN populated); earlier{}was a test error (called withfalse→ the non-abbreviated path). The detailed/issuerCertificate-chain path is a literalTODOat tls_socket_functions.zig:149 — identical in the pin, so pin tests needing it fail there too (not a Home gap).server.addContext()— fixed in 4ed9a49. The hand-mirror read onlyserverName, not itsservernamealtName (which node:tls passes), so the client sent no SNI → server context selection never matched. IsolatedaddContexttest now passes (context1/context2 authorize via their CA, unknowncontext falls back). Remaining node-tls-context failures are the file's external-connecting tests (machine's TLS-network crash).tls.createServer({passphrase: wrong})should reject but listens; passphrase IS passed to us_ssl_ctx_from_options, so it's uws-level validation timing/error-surfacing.getPeerCertificate'\0' handling (CVE-2009-2408 test).B. Bun Shell (
$) — (parallel agent landing corpus tests)$\cmd`segfaults** in the interpreter execution-completion microtask (get_by_idon null); construction + parse work, the completion callback derefs a null/freed object. ~11bun/shell` files.C. fetch / HTTP client
fetch-gzip.test.ts2/3 → 5/0.body-stream.test.ts— the hang is fixed by c508e00; remaining failures now fail fast and are a separate request-body-stream clone bug (reader (clone)+force ReadableStream conversion).D. HTTP/2 & HTTP/3
toBemismatches, "JSON Parse: Missing").fetch-http2-client.test.ts(58 fail),fetch-http2-adversarial(9).fetch-http3-*).E. Deep/unported subsystems
cc.test.ts.s3-stream-cancel-leaksegfault; S3 largely parked.ClientFile.Packedsize invariant relaxed for release ([df83921]).F. Memory-leak tests (triaged on ReleaseSafe 2026-07-07 — build target un-rotted in 55f7140)
resetArena— every inspected error left one full transpile in the module loader arena (74MB/100k iters). Now passes with 'RSS increased by 4 MB', exactly real Bun's number.lol_html_*symbols are noop stubs (lol-html Rust crate unported —link_bun_rust_archive = false); the child panics on the first.on()(else => unreachableon a garbage return at lolhtml_sys/lol_html.zig:253) and the test fails on stderr. Belongs with section E as an unported-library item: linklol_html_c_api(rlibs exist in the Bun build tree), delete the stubs, and restore the pin's HTMLString.toString free (lol_html.zig:623 — latent leak once real lolhtml links).G. Environmental / infra (mostly resolved)
home testdefaults to native bun:test runner (078c659)bun:internal-for-testinggated in release (13deb08)Done this session (context)
signals (db0df4d), native-VM file runner (f296bb6), Worker cross-thread + teardown (dcb6db6, 85aba46), native test runner default (078c659), translateUVErrorToE (188268e), Bun.markdown renderer (2768d9a), MD4 (1279c18), Bun.CSRF (96b8f05), node:tls SecureContext ~40 tests (6cf4a6b), release build + build-recovery (dff7bfa, df83921, 13deb08).