feat(push-channels): WebSocket/SSE as data sources (7.3, C8)#62
Merged
officialCodeWork merged 1 commit intoJul 17, 2026
Merged
Conversation
Server-push channels are long-lived data sources, not request/response fetches. - New `sse` DataSourceKind (schema regenerated); new pushchannels.ts: detectPushChannel matches `new WebSocket(url)` / `new EventSource(url)` by constructor name (allowing a window./self. qualifier — low false-positive set) and resolves the URL through the existing resolveEndpoint. - extractBodyFacts gains a NewExpression pass emitting the data-source node + fetches-from edge, mirroring the fetch path (skipped inside API wrappers). websocket for WebSocket, sse for EventSource; transport in method (WS/SSE). - New fixture c8-push-channels (WebSocket wss:// + SSE /api/.../stream); 4 unit tests. eval 332/0/0/0, determinism 1.000, all metrics 1.000; parser-react 164 tests, schema drift gate green, typecheck + lint clean. socket.io deferred (needs import-aware detection). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Phase 7.3 — Push channels (failure mode C8)
Server-push data arrives over a long-lived connection, not a request/response fetch. This recognizes
new WebSocket(url)andnew EventSource(url)as data sources so a component fed by a live channel shows it in its lineage.Changes
sseDataSourceKind(schema regenerated, drift gate green) — honest for EventSource;websocketstays for WebSocket.pushchannels.ts:detectPushChannelmatches anew WebSocket(...)/new EventSource(...)expression by constructor name (allowing awindow./self.qualifier — a very low false-positive set) and resolves the URL through the existingresolveEndpoint(constant-folded,:param-normalized).extractBodyFactsgains aNewExpressionpass that emits the data-source node +fetches-fromedge, mirroring the fetch path (skipped inside API wrappers). Transport is carried inmethod(WS/SSE).Fixture & tests
c8-push-channels: a WebSocket (wss://chat.example.com/socket) and an SSE channel (/api/notifications/stream) → onewebsocketand onessesource, each with afetches-fromedge.Verification
pnpm eval→ 332 pass · determinism 1.000 · all metrics 1.000socket.io deferred —
io()needs import-aware detection to avoid false positives on the commonioidentifier. Tracker updated.🤖 Generated with Claude Code