• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 25635486744

10 May 2026 05:45PM UTC coverage: 82.43% (+0.02%) from 82.412%
25635486744

push

github

web-flow
feat(shared): TypedHub publish awaits async handlers, adds publishAsync (#1846)

* feat(shared): TypedHub publish awaits async handlers, adds publishAsync

- publish() now awaits all local handlers (sync + async) concurrently
- Returns structured PublishResult with delivered count and failures
- Throws TypedHubPublishError when handlers fail; all handlers still run
- Adds publishAsync() for explicit fire-and-forget semantics
- Handler errors are logged and surfaced, not silently swallowed
- Updates task-schedule-fire handler eventHub interface for compatibility
- Removes unnecessary setTimeout waits from existing tests
- Adds comprehensive tests for async semantics, error handling, mixed scenarios

* fix(shared): address review feedback on TypedHub async delivery

- Migrate fire-and-forget sites (error-manager, github-service) from
  emit() to publishAsync() to prevent unhandled TypedHubPublishError
- Fix handler diagnostic names to be unique per subscription (global#1,
  session:abc#2) instead of all sharing the same name
- Fix handlerNames Map cleanup during unsubscribe (prune empty entries)
- Update stale comments in session-handlers/index.ts that incorrectly
  claimed dispatchLocally does not await async subscribers
- Fix error-manager tests to assert on publishAsyncSpy instead of emitSpy

* fix(shared): prune handlerNameCounters on unsubscribe/close, guard github emitEvent

- Clear handlerNameCounters entries when the last handler for a
  subscription key is removed, and clear the entire map on close()
- Wrap github-service emitEvent in try/catch so a hub emission failure
  never aborts event routing or inbox fallback

8234 of 11506 branches covered (71.56%)

Branch coverage included in aggregate %.

104 of 105 new or added lines in 3 files covered. (99.05%)

65017 of 77358 relevant lines covered (84.05%)

290.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

25.23
/packages/daemon/src/lib/github/github-service.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc