Teach the conformance harness to run change-feed fixtures - #89
Merged
Conversation
Adds the SSE streaming dispatch helper (SSEDecoder + openChangeFeed) the change-feed fixtures need, since they pin an ordered stream of frames rather than a request/response pair. Verified against a throwaway SSE test app built with Hono's own streamSSE, proving the open/mutate-while- open/collect/timeout mechanics work before there's a real GET /changes to point them at. changeFeedFixtures and changeFeedSequenceFixtures are imported and given their own coverage-gated describe blocks, entirely skipped for now — no src/routes/changes.ts exists yet (#82). The two sequence fixtures stay skipped even after #82 lands, since resume support is #84's work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014u78zif6NgggtFVbiSZ2co
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.
Summary
tests/changeFeedClient.ts: anSSEDecoder(incremental SSE frame parser) andopenChangeFeed(), the streaming dispatch helperchangeFeedFixturesneed — a fixture pins an ordered stream of frames, optionally across mutations made while the connection is open, not a request/response pair like every other block in the harness.tests/lib/changeFeedClient.test.tsagainst a throwaway app built with Hono's ownstreamSSE(already shipped in the installedhono@4.13.3— no version bump or hand-rolled server-side SSE framing needed), plus direct unit tests of the decoder (split chunks, keepalive comments, per-frameidsemantics, non-JSON data).changeFeedFixtures/changeFeedSequenceFixturesintotests/conformance.test.tsand gives each its own coverage-gateddescribeblock, matching the file's existing pattern.Every fixture in both arrays is currently in
SKIPPED—GET /changesdoesn't exist yet (#82). The coverage test still does real work: it fails loudly the moment core adds, removes, or renames a change-feed fixture nobody updated theseSKIPPEDreasons for. The two sequence fixtures are noted as staying skipped even after #82 lands, since resume support is #84's work.Nothing in
src/changes — this PR is test-harness scaffolding only, per #81's scope ("this PR's value is the scaffolding plus a coverage test that fails loudly").Closes #81.
Test plan
pnpm exec vitest run— 357 tests pass (18 files)pnpm exec eslint .— cleanpnpm exec tsc --noEmit— cleanpnpm exec prettier --check— cleanGenerated by Claude Code