Skip to content

test(e2e): check poll mode on a source with no subscriptions - #102

Merged
leggetter merged 2 commits into
mainfrom
test/e2e-poll-no-subscriptions
Nov 5, 2026
Merged

leggetter merged 2 commits into
mainfrom
test/e2e-poll-no-subscriptions

Conversation

@leggetter

@leggetter leggetter commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

npm run e2e now 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 gets 200, 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):

  • Takes cursors with poll_events and events/poll before the run's email or fill is sent.
  • wait_for_event with matching arguments, and events/poll with none, must return the event within 240 s and 60 s.
  • Arguments that don't match mustn't return it. An unknown argument is a tool error (isError).
  • Records whether the service's source had no connections, and whether Event Gateway rejected the request as 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 e2e passing with the no-subscriptions path exercised.
  • A cold test: a new Hookdeck project, npm pack from the release commit, an agent with no context following npx skills add hookdeck/mcp-events-bridge --skill mcp-events-bridge then "set up the MCP Events bridge", and Claude Code receiving a real event through wait_for_event.

Tested: npx tsc --noEmit (includes scripts/) and npx vitest run (446 tests) pass. Run live on 5 Nov against a Hookdeck project with no webhook subscriptions: 15/15 checks pass, every poll: check included, and Event Gateway rejected the test email's request as NO_CONNECTION while poll returned it in 7 s.

No changelog entry: test and release-process only.

🤖 Generated with Claude Code

leggetter and others added 2 commits November 5, 2026 18:20
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>
@leggetter
leggetter merged commit 6e5b258 into main Nov 5, 2026
2 checks passed
@leggetter
leggetter deleted the test/e2e-poll-no-subscriptions branch November 5, 2026 19:15
@leggetter leggetter mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant