Repository navigation
Delete the session stream; poll entries instead - #210
Merged
Merged
Conversation
GET /v1/sessions/:id/stream is gone, with its pacing config (FUNKY_STREAM_POLL_MS, FUNKY_STREAM_HEARTBEAT_MS). Clients follow a session by polling GET /v1/sessions/:id/entries?after=<seq>, which returns the same entry objects in seq order: the console's useEntries polls it once a second while the session can still change, the stack e2e follows the log the same way, and the README's quick start shows a curl loop. Behind Cloud Run's HTTP/1.1 a client hang-up never reaches the container, so every abandoned stream kept polling the store and held a request slot for up to an hour; reconnecting clients filled every slot and the api stopped answering. Funky runs deferrable batch work, which does not need push. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The console's tail now gives up after ten polls in a row fail, rather than asking a refusing api once a second forever; the session head shows "Disconnected" with a Reconnect button, which re-reads the log and starts the tail again. GET /entries gets the foreign-namespace 404 test the deleted stream had. The stack e2e bounds each poll request by its deadline, so an api that never answers fails with the poll's own timeout rather than vitest's. The README's follow loop stops on an answer that isn't a list of entries instead of printing the error as rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n-stream-v1 # Conflicts: # apps/api/test/sessions.test.ts
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.
Deletes
GET /v1/sessions/:id/streamand its pacing config (FUNKY_STREAM_POLL_MS,FUNKY_STREAM_HEARTBEAT_MS). Clients follow a session by pollingGET /v1/sessions/:id/entries?after=<seq>, which returns the same entry objects in seq order. Behind Cloud Run's HTTP/1.1, a client hang-up never reaches the container: every abandoned stream kept polling the store and held a request slot for up to an hour, reconnecting clients filled every slot, and the api stopped answering. Funky runs deferrable batch work, which does not need push.useEntriespolls once a second while the session can still change, one request at a time, and not while the tab is hidden. After 10 polls in a row fail it stops, and the session head shows "Disconnected" with a Reconnect button that re-reads the log and starts polling again./entriesgets the foreign-namespace 404 test the stream had. The stack e2e follows the log by polling, and each request is bounded by the poll's deadline.Full
pnpm test, typecheck and prettier pass. The stack e2e did not run (it needs a database URL and real Anthropic and E2B keys), and the console's Disconnected state has not been looked at in a browser.🤖 Generated with Claude Code