1.5 KiB
1.5 KiB
Tasks: events-spec-tightening
1. Spec delta
- 1.1 Author
specs/events/spec.mddelta with## MODIFIED Requirements(Deterministic id and clock sources, Structured errors, Passive observability adapter) and## ADDED Requirements(emitAsync timeout, emitAsync abort, Envelope traceId propagation). - 1.2 Add
**Verified by:**line to every requirement (existing + new).
2. Conformance test
- 2.1 Add
packages/events/events/src/conformance.spec-conformance.test.tspinning:new EventBus({ clock, idGenerator })accepts injections (replaces ghostcreateBus).- Async listener throw is captured into
EmitResult.errorswithEVENTS.LISTENER.THREW. withObservabilityadapteronEmitErrorfires when dispatch rejects.emitAsyncwithtimeoutMsrejects withEVENTS.EMIT.TIMED_OUTpast the deadline.emitAsyncwith an abortedAbortSignalrejects withEVENTS.EMIT.ABORTED(cause === signal.reason).traceIdpassed toemit/emitAsyncsurfaces onEventEnvelope.traceId.
3. Gate
- 3.1
bunx turbo lint typecheck test --filter=@suaveplan/eventsgreen. - 3.2
bunx turbo test:coverage --filter=@suaveplan/events100/100/100/100. - 3.3
bun scripts/openspec-conformance.ts @suaveplan/eventsexits 0.
4. Fold + archive
- 4.1 Fold delta into
openspec/specs/events/spec.md. - 4.2 Move
openspec/changes/events-spec-tightening/toopenspec/archive/2026-04-27-events-spec-tightening/.