Repository navigation
test(e2e): check poll mode on a source with no subscriptions - #102
Merged
Merged
Conversation
0.8.0 to 0.9.0 shipped with wait_for_event, poll_events, events/poll and watch returning nothing on a freshly set-up bridge (fixed in #98). The unit tests' fake Event Gateway accepted requests the real one rejects as NO_CONNECTION, and the e2e never polled. - The e2e now checks poll mode first, always, before any test subscriber subscribes: cursors from poll_events and events/poll taken before the run's email or fill is sent, then wait_for_event with matching arguments and events/poll with none must return it, arguments that don't match mustn't, and an unknown argument is a tool error. - It records whether the service's source had no connections, and whether Event Gateway rejected the request as NO_CONNECTION, and fails if leftover connections meant the no-subscriptions path wasn't exercised. - The release skill adds two gates before publishing: npm run e2e passing with that path exercised, and a cold test of the published setup steps with the package packed from the release commit and Claude Code receiving a real event through wait_for_event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client that polls holds a poll subscription; what the check needs is a source with no webhook subscriptions, and so no Event Gateway connections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run e2enow checks poll mode first, before anything subscribes, against the real Event Gateway. This is the setup new users make, and the path Claude Code, Codex and Cursor use. It would have caught the bug fixed in #98, where poll returned nothing on a fresh bridge. The release skill now requires this check, plus a cold test of the setup steps, before publishing.Details
Why: since 0.8.0 a source has an Event Gateway connection only per subscription, so on a bridge with no subscriptions every request is rejected as
NO_CONNECTION(the sender still gets200, and the request is kept). Poll listed only accepted requests. The unit tests' fake Event Gateway accepted these requests, and the e2e never polled.The e2e check (always on, runs before any test subscriber):
poll_eventsandevents/pollbefore the run's email or fill is sent.wait_for_eventwith matching arguments, andevents/pollwith none, must return the event within 240 s and 60 s.isError).NO_CONNECTION. Leftover connections in a shared project make those checks fail, so the check can't pass without covering the no-subscriptions path.Release skill: two new gates before publishing:
npm run e2epassing with the no-subscriptions path exercised.npm packfrom the release commit, an agent with no context followingnpx skills add hookdeck/mcp-events-bridge --skill mcp-events-bridgethen "set up the MCP Events bridge", and Claude Code receiving a real event throughwait_for_event.Tested:
npx tsc --noEmit(includesscripts/) andnpx vitest run(446 tests) pass. Run live on 5 Nov against a Hookdeck project with no webhook subscriptions: 15/15 checks pass, everypoll:check included, and Event Gateway rejected the test email's request asNO_CONNECTIONwhile poll returned it in 7 s.No changelog entry: test and release-process only.
🤖 Generated with Claude Code