ReviewOS

home-lang/home

Fix brace-aware Glob.match and promote typed runtime corpus

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

Close three remaining Bun corpus rewrite paths with a real matcher fix and unchanged native execution.

Scope:

  • make brace alternation ignore commas inside character classes, so x.{ts,[,]foo} matches x.,foo but not x.]foo
  • add direct matcher regression coverage
  • remove the no-op rewriteGlobMatchCorpus and route js/bun/glob/match.test.ts unchanged through the native test runner
  • remove rewriteBufferResolveObjectURLCorpus and route js/node/buffer-resolveObjectURL.test.ts unchanged
  • remove rewriteAsyncLocalStorageThenableCorpus and route js/node/async_hooks/async-local-storage-thenable.test.ts unchanged
  • preserve byte-identical Bun fixtures and exact test accounting

Current strict baseline versus pinned Bun 4982b91:

  • glob match: Home 24 pass / 1 fail; Bun 25 pass / 0 fail, with the sole mismatch at a comma inside [,] within braces
  • buffer resolveObjectURL: both 3 pass / 0 fail
  • AsyncLocalStorage thenables: both 5 pass / 0 fail

Acceptance includes focused runtime units plus Debug and ReleaseSafe routed/strict parity.

9 days ago

Completed in 57fa4d277.

Implemented the real brace parser fix: commas inside character classes no longer split brace alternatives. Added direct matcher regression coverage for x.{ts,[,]foo} and removed all three scoped corpus rewrite functions. The glob, buffer ObjectURL, and typed AsyncLocalStorage fixtures now execute byte-identically through the native test runner.

Validation against pinned Bun 4982b91e3:

  • pinned Bun combined baseline: 33 pass / 0 fail
  • Home runtime units: 1,820 pass / 19 skip / 0 fail
  • Debug strict: 33 pass / 0 fail
  • Debug routed: 33 pass / 0 fail / 0 unsupported / 0 TODO
  • ReleaseSafe strict: 33 pass / 0 fail
  • ReleaseSafe routed: 33 pass / 0 fail / 0 unsupported / 0 TODO
  • all three vendored fixtures are byte-for-byte identical to /Users/chris/Code/bun/test
  • Debug and ReleaseSafe builds both succeed on current origin/main

No fixture edits, test weakening, deadline changes, or filename-specific behavioral gates were introduced.

Sign in to comment on this issue.