Skip to content

test(backend): the smoke test connects two people (BAC-192) - #381

Merged
hycursion merged 1 commit into
mainfrom
adam/bac-192-the-smoke-test-connects-two-people-through-both
Nov 17, 2026
Merged

hycursion merged 1 commit into
mainfrom
adam/bac-192-the-smoke-test-connects-two-people-through-both

Conversation

@hycursion

Copy link
Copy Markdown
Collaborator

Closes BAC-192.

The smoke test now connects two people through both services. Before this, each service's unit tests faked the other, so only production had run a meeting end to end.

What the new case does

  1. It adds two participants with claimed tokens, one of kind A and one of kind B, with names that are new each run.
  2. Each person logs in on both services. The test signs a login link with the Event Service key it already gives both services, the way the GeekyKey Service does for 8.6. It posts that link to the Event Service's /auth/login-link (7.4). It then asks the Event Service for a link back (8.12) and posts it to the Worker's /auth/login-link (7.5). The services' own routes set both session cookies, and the test turns on no dev login.
  3. Each person sets a name and answers every question with PATCH /api/v1/me (8.7).
  4. A meets B's token through the Worker (8.8). The answer has to be waiting, with B's name.
  5. B finds A's request in /me (8.1) and accepts it (8.10). The answer has to be connected.
  6. The test reads the database. It expects one row in connections for the pair, with A's kind and B's kind on the right sides, and no meeting_halves row for them that still holds a request.

The test sets the connection rule to token kinds and turns showcase mode off first. A new event has both settings that way, but geekykey_test may hold whatever an earlier test left.

The smoke test's Worker settings now list the Event Service with meetings and login_links_to_geekykey on, as wrangler.jsonc does for production.

Checked by hand

I broke the Worker's hand-off in token-routes.ts three ways, ran pnpm test:smoke each time, and put the file back:

Change Result
Wrong user_id Fails: answers_needed instead of waiting
Wrong owner_id Fails: owner_name is null
owner_kind taken from the user's own token Fails: same_kind instead of waiting

Locally all four smoke cases pass, and tsc, oxlint and oxfmt --check are clean for the Event Service.

Agreement

No additions. The case uses 7.4, 7.5, 8.1, 8.7, 8.8, 8.10 and 8.12 as they are on main.

🤖 Generated with Claude Code

A meets B's token through the Worker (8.8) and B accepts on the Event
Service (8.10). The database then holds one connection between them, with
each one's kind, and no request left waiting. Both people log in through
the services' own login-link routes (7.4, 8.12, 7.5), starting from a link
the test signs with the Event Service key it already hands both services.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@hycursion
hycursion merged commit 9a47e51 into main Nov 17, 2026
7 of 8 checks passed
@hycursion
hycursion deleted the adam/bac-192-the-smoke-test-connects-two-people-through-both branch November 17, 2026 13:24
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