ReviewOS

zig-utils/zig-js

ABI: implement IPC process event dispatch

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

Parent: #140 Related: #134, #163, #164, #239, #243

Implement the three shared private-ABI IPC process event entry points on the realm-owned process EventEmitter.

Scope

  • Process__emitMessageEvent
  • Process__emitErrorEvent
  • Process__emitDisconnectEvent

Acceptance

  • Gate each dispatch on an existing listener before decoding arguments; with no listener, even an error event and opaque/foreign values are exact no-ops.
  • Emit message(value, handle), error(value), and zero-argument disconnect synchronously with exact value identity, callback this, listener order, once/removal behavior, and reentrant mutation semantics.
  • With listeners present, reject foreign-VM values and preserve listener throws through the first-pending exception boundary.
  • Preserve selected-realm and sibling-realm isolation; do not fabricate IPC transport state or broaden this into send/serialization support.
  • Add focused and compiled-consumer fixtures, refresh both pinned inventories, update README/API/ABI integration evidence and parent issues, and publish committed verification.
9 days ago

Completed on main in implementation commit 6568176 and evidence commit 6c0dad2. Exact listener-before-decode gates, message(value, handle), error(value), zero-argument disconnect, same-VM sibling identity, once/removal semantics, absent-listener foreign no-ops, observed foreign rejection, and listener-throw propagation are covered. Verification: combined process batch 12/12 with zero leaks; Home consumer 243/243; Home 244/431 (187 pending); Bun 238/421 (183 pending); both audits have zero unclassified entries. The benchmark artifact remains 36a617b because this ABI-only event slice does not affect its workload.

Sign in to comment on this issue.