Advertise the change feed in discovery - #91
Merged
Conversation
Adds the top-level `changes` field to GET /.well-known/stack: transports: ['sse'], resume: false (until #84 mints cursors), records: true (GET /changes already honors ?include=record unconditionally, per #82). Un-skips the two change-feed discovery fixtures parked in #79, and adds a test-only WellknownRouteOptions.changeFeedRecords override (mirroring ChangeRouteOptions' existing pattern) so the records: false branch of the wire contract is exercised without a real deployer-facing toggle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZHovrqJwzx34eXPA9Gabj
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
changesfield toGET /.well-known/stack'sDiscoveryResponse:transports: ['sse'],resume: false(until Resume the change feed from a cursor #84 mints cursors),records: true(GET /changesalready honors?include=recordunconditionally, per Implement GET /changes (SSE change feed) #82).discovery-advertises-a-change-feedanddiscovery-advertises-a-feed-that-neither-resumes-nor-includes-recordsintests/conformance.test.ts, parked in Upgrade to the core 0.13 line and adopt the 404/403 anti-oracle rule #79.WellknownRouteOptions.changeFeedRecordsoverride onwellknownRoutes()— mirroring the existingChangeRouteOptionspattern insrc/routes/changes.ts— so the fully-conformantrecords: falsebranch of the wire contract can be exercised even though this server has no real deployer-facing toggle for it (GET /changesalways honors?include=record).docs/api.md's discovery response example and adds a paragraph explaining the new field.Why
Per #83: advertising
changesbeforeGET /changesexisted would have been worse than advertising nothing (a client fails locally atopen()when the field is absent, vs. discovering a 404 partway through a connection when it's falsely advertised). #82 (the endpoint) and #79 (the core 0.13 bump this depended on) are both merged, so this issue is now unblocked.Test plan
pnpm typecheckpnpm lintpnpm format:checkpnpm test(381 tests passing, including the two newly un-skipped conformance fixtures and two new hand-written tests intests/routes/wellknown.test.ts)Closes #83.
Generated by Claude Code