ReviewOS

home-lang/home

Port Bun.Glob subprocess leak stress corpus

#127
Closed chris opened this 9 days ago ·
9 days ago

Scope

Activate the byte-identical js/bun/glob/leak.test.ts corpus as the native subprocess follow-on to #126.

The four upstream tests each warm the linked native Glob implementation for 1,000 iterations, measure RSS around another 100,000 operations, force GC, and fail if growth exceeds the ASAN-aware threshold. Coverage includes sync and async scan plus GlobWalker lifetime.

Baseline

The exact file is currently rewritten to one native todo:

  • 0 pass
  • 0 fail
  • 0 unsupported
  • 1 todo

The local file is byte-identical to ~/Code/bun.

Acceptance

  • Preserve upstream byte identity and original 1,000/100,000 iteration counts.
  • Run all four active leak tests through real home-debug --smol -e subprocesses.
  • Use the linked native Bun.Glob and process RSS measurements; do not synthesize a passing memory result.
  • Preserve the original 100 MB normal / 400 MB ASAN thresholds.
  • Add a permanent unchanged-corpus regression.
  • Pass the exact file, existing Glob suite, and full home_test gate.
  • Commit and push as Chris Breuer with no coauthors.
  • Link completion to #66 and #126.
9 days ago

Implemented and pushed in ac0d521.

The byte-identical upstream file now runs all four active tests without a native todo. Each test launches a real home-debug --smol -e subprocess through the native spawn bridge, uses the linked Bun.Glob implementation, performs the original 1,000-iteration warmup plus 100,000 measured operations, forces GC, reads process RSS, and enforces the original 100 MB normal / 400 MB ASAN threshold.

Validation:

  • exact leak.test.ts: 4 pass, 0 fail, 0 todo, 0 unsupported
  • focused Glob chain: leak 4/4, stress 2/2, scan 160/160
  • permanent unchanged-corpus regression asserts the original loop count, threshold interpolation, and --smol eval subprocess path
  • upstream file remains byte-identical
  • no workspace shadow path is created
  • Zig formatting and diff checks pass
  • full home_test gate passes with no failures

No synthetic leak result or shortened workload was introduced. The commit is authored and committed as Chris Breuer with no coauthors. This follows #126 and advances #66.

Sign in to comment on this issue.