Parent: #140 Tracked by: #134, #163, #164
Implement the pinned private ArrayBuffer__fromSharedMemfd boundary as a directly testable ownership slice, separately from the opaque native JSC::ArrayBuffer handle API.
Acceptance
- Match the pinned C ABI and selected Home/Bun
JSTypetags forArrayBufferandUint8Arrayresults. - Validate the file descriptor, total mapping size, and requested byte range without overflow or partial ownership.
- Create a private read/write mapping of the complete declared region, expose the requested slice without copying, and never close or otherwise take ownership of the caller file descriptor.
- Return an exact ordinary
ArrayBufferorUint8Array; reject every other requested type and every invalid or unsupported mapping cleanly. - Unmap the complete original mapping exactly once on collection or context teardown, including construction-failure paths.
- Prove slice identity and mutability,
MAP_PRIVATEfile isolation, non-zero offsets, invalid descriptors/ranges/types, GC, and teardown behavior with focused unit and compiled consumer tests. - Mark the export implemented in both pinned inventories, preserve zero unclassified entries, and update the README/private ABI evidence.
Non-goals
The opaque JSC__ArrayBuffer__ref, JSC__ArrayBuffer__deref, and JSC__ArrayBuffer__asBunArrayBuffer handle contract will be tracked as a separate child because it needs an explicit native handle producer and independent lifetime model.