ReviewOS

home-lang/home

Bun parity: implement AbortSignal.any composition semantics

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

Scope

Port Bun's js/web/abort/abort.test.ts at corpus position 4086 by implementing AbortSignal.any() in the Home Bun-compat bootstrap.

Acceptance criteria

  • aborts when either input signal aborts and preserves the winning reason
  • handles already-aborted inputs deterministically
  • removes listeners from losing signals after settlement
  • rejects malformed iterables/signals with a structured ERR_ABORT_SIGNAL_ANY error
  • diagnostic includes operation, input index, cause, and a composed operation stack
  • focused Bun corpus file passes with zero failures/unsupported tests
  • permanent regression coverage is added

Tracked from #66.

10 days ago

Implemented and pushed to main in 762822749 (feat(abort): port signal composition semantics).

The Home Bun-compat bootstrap now provides AbortSignal.any() with:

  • first-abort propagation and exact winning-reason identity
  • deterministic already-aborted input handling
  • cleanup of listeners attached to losing signals
  • iterable and signal validation
  • structured ERR_ABORT_SIGNAL_ANY failures carrying operation = abort.signal.any, inputIndex, the original cause, and a composed operation/cause stack

Permanent regression coverage checks the upstream file, structured invalid-input diagnostics, already-aborted reasons, and losing-listener cleanup.

Verification:

  • focused js/web/abort/abort.test.ts: 5 passed, 0 failed, 0 todo, 0 unsupported
  • positions 4084–4086 together: 3 files, 12 passed, 0 failed, 0 todo, 0 unsupported, 0 allowed-empty
  • permanent gRPC error-stack suite: passed
  • permanent SQL adapter contracts: passed
  • permanent third-party/error-diagnostic suite: passed (51 diagnostic cases)

This completes the acceptance criteria. Parent tracker: #66.

Sign in to comment on this issue.