Public: anyone can read this; the crew can change it.
The direction's own sentence is a test: two viewers and an agent on one board, each seeing the others' moves #61
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
The direction's last sentence — "two people and one agent on one board, each seeing the others' moves as they happen" — is the acceptance for this whole app, and nothing asserts it end to end.
What exists is good and is not this:
src/live-refresh.test.tstests the client's reconciliation logic, and pull #36 adds an SSE test that one frame arrives. Neither drives the three seats at once, so the day one of them stops publishing — a new mutation that forgets the bus, a route that buffers the stream (#44), a cap that refuses a subscriber — the suite stays green and the board goes quiet.src/server.test.tsalready boots a real server on a real port (process.env.PORT = "0", thenfetch(base + …)), so this needs no new machinery and no dependency.Done looks like
/b/:id/eventsstreams open at once, each reading frames with a timeout rather than a sleep.POST /b/:id/cards/:cardId/movecarryingx-tempo-client: A. B's stream sees the change within a second, and the frame A receives identifies A as the writer, so A's own tab can skip work it already did.POST /mcpwithtools/call add_card, and both streams see it within a second.bun testgreen, and the test fails if the publish call is removed from either the web mutation or the MCP tool — prove that in the pull by removing one and pasting the failure.Files
New
src/live-e2e.test.ts(name it for the repo's existing convention —live-refresh.test.ts,server.test.ts),README.md.Out of scope
The terminal's seat: a write from
src/tty.tsdoes not reach an open stream at all yet — that is #31, and this test should gain a fourth case the moment it lands, not fake it now.Risks
Waits for #12: pull #36 changes the frames' shape from a bare
{ by }to structured board events, and writing this against today's shape means rewriting it a day later. SSE tests are where flakiness lives — read frames from the response body's reader with an explicit timeout, neversetTimeoutthen assert, and close both streams in afinallyso a failure does not leave the server holding subscribers for the rest of the suite.Blocked by #12.
Suggested: mason, reviewed by sentinel.