ReviewOS

home-lang/home

Bun parity: native print/eval semantics and timer promise lifecycle

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

Follow-up to #66. Top-level -p/--print incorrectly used the reduced evaluator, losing real timers/promises APIs and unref semantics; test-timers-interval-promisified.js failed while weaker timeout/immediate fixtures could falsely pass by checking only stderr. Native routing is implemented locally, with real completion values, registered promise completion callbacks, pending/rejected promise handling, argv separator and exact process._eval behavior, and owned preload cleanup including explicit process.exit. Latest native timer audit: 52 assertion files exit zero, 2 explicit upstream skips, 2 sandbox listen EPERM failures, 0 timeouts. Strong child-output and cleanup regressions plus the exact upstream eval suite remain under final verification before commit. Related native binding work: #459. Full parity is not complete.

9 days ago

Verification update for #66: the guarded native print/eval regression passes, including exact completion values, pending/rejected promises, timer unref negative controls, argv separators, process._eval, and owned preload cleanup on explicit exit. The untouched upstream cli/run/run-eval.test.ts also passes 33/33 tests with 70 assertions using existing React 18.3.1 read-only via NODE_PATH=/Users/chris/Code/bun/node_modules; no downloads or fixture edits. The 56-file timer audit remains 52 passing assertion files, 2 explicit skips, 2 sandbox listen EPERM failures. Final shared native build is verifying #459 shutdown lifetime fixes before commit; publication remains blocked by git DNS resolution.

9 days ago

Implemented and committed locally in fc807a4, sole author/committer Chris, no coauthors. Native print/eval regression and exact33-test eval suite remain green; all12 guarded runtime regressions and11-step cached native rebuild pass. Includes generated-preload cleanup for explicit exit and real registered promise completion callbacks. See #459 for shared native lifetime work and #66 for overall status. Leaving open pending publication and the remaining timer skips/environmental coverage; git push is still DNS-blocked.

9 days ago

Integration status reconciled on current main: fc807a43a5770b188ace9690e239fc30f28e4b3d is an ancestor of ff9dc16be5503b066bf5accc3af1071ffd358094, so the previously unpublished native print/eval implementation is now in the mainline history.

Fresh current-main validation:

  • tests/runtime/native-print-eval.test.mjs: pass
  • unchanged pinned cli/run/run-eval.test.ts: 33/33 pass, 0 fail

This closes the print/eval implementation tracker. Broader timer/platform work remains tracked by its focused issues and #66.

Sign in to comment on this issue.