ReviewOS

home-lang/home

Port Bun node:fs buffer lifetime and ownership-sentinel semantics

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

Track four remaining failures in Bun test/js/node/fs/fs.test.ts.

Current Home Debug baseline: 258 pass / 4 fail / 7 skip. The failures cover: lchown(-1, -1) sentinel preservation; writevSync snapshotting all JS elements before capturing pointers; async writev backing-store pinning through completion and release on rejection; and async writeFile buffer-path pinning while options getters execute.

Port Bun’s underlying argument-conversion and lifetime semantics without skips, copied assertions, or timing workarounds.

10 days ago

Resolved on main by d8cdf06d88abf37cfa12af4ec3f4a6fc4084c9f2 (fix(fs): port Bun buffer lifetime semantics).

The shared runtime now preserves the unsigned -1 uid/gid sentinel, snapshots all vector elements before taking raw pointers, roots and pins vector backing stores for asynchronous readv/writev operations with balanced rejection/completion release, and pins buffer-backed paths while option getters execute.

Validation against the unmodified upstream js/node/fs/fs.test.ts:

  • before: 258 pass / 4 fail / 7 upstream platform skips
  • Debug: 262 pass / 0 fail / 7 upstream platform skips (5,405 assertions)
  • true ReleaseFast: 262 pass / 0 fail / 7 upstream platform skips
  • exact Debug and ReleaseFast builds completed cleanly

No test source, assertion, workload, timeout, or skip was changed.

Sign in to comment on this issue.