ReviewOS

home-lang/home

Port Bun stack formatting and error diagnostics

#121
Closed chris opened this 10 days ago ·
10 days ago

Tracks the focused port of js/bun/test/stack.test.ts from the vendored Bun corpus.

Scope:

  • normalize JavaScriptCore stack frames to Bun-compatible at function (file:line:column) output
  • preserve function-name updates, async frames, and anonymous frames
  • cover Bun.inspect(Error) through the same stack representation
  • port fixture line/column behavior and subprocess error diagnostics
  • add an exact-corpus regression and keep the full home_test gate green

Parent tracker: #66

10 days ago

Implemented and pushed to main in c0756a8.

Completed:

  • activated the byte-identical js/bun/test/stack.test.ts corpus (plus byte-identical custom/system/line-column fixtures)
  • normalized JavaScriptCore frames into Bun-compatible at function (file:line:column) stacks
  • preserved dynamic function-name overrides, async frames, anonymous boundaries, and shared Bun.inspect(Error) behavior
  • routed both diagnostic fixtures through real home-debug run subprocesses while preserving exit status and canonicalizing Bun-visible getter/system-error formatting
  • ported Bun's stack-location behavior into normalizeBunSnapshot
  • added a permanent bootstrap regression asserting 6 passes and the single upstream todo

Validation on the final rebased tip:

  • exact corpus: 6 passed, 1 todo, 0 failed, 0 unsupported
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures: passed
  • Zig formatting and git diff --check: passed

Parent tracker: #66

Sign in to comment on this issue.