FM-PS-LYNX-014 T1+T4: adapters own Response; name NDJSON Accept policy - #44
Merged
Merged
Conversation
T1: each SyncStreamTransport interprets its own wire shape and returns a
finished Response via syncStreamResponse({bytes}|{streamingId}). NativeHttpFetch
alone owns enterEarlyCapture; HostFetch no longer sniffs lynxExtension.streamingId.
response.ts shrinks to syncStreamResponse, stabilizeStreamingResponse, and
stabilizeJsonResponse. Drop transport files from the oxlint ignore list.
T4: preferNdjsonAccept runs at syncStreamRequestFromFetch, not inside headerMap.
Co-authored-by: 達達 <djwok@users.noreply.github.com>
Satisfy oxlint anti-slop and tsc after dropping transport files from the ignore list. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Deliver identifier fallback events after the reader attaches. Early capture belongs only to NativeHttpFetch (T1). Format the touched transport files. Co-authored-by: 達達 <djwok@users.noreply.github.com>
djwok
marked this pull request as ready for review
September 9, 2026 16:19
This was referenced Sep 9, 2026
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.
Implements T1 + T4 only from issue #34 on current
main. Does not include T2 / ADR-0004 / LynxFetchModule streaming-fallback deletion, T3/NativeSql, or N1–N4.T1 — Transport adapters own their Response
Each
SyncStreamTransportinterprets its own wire shape and returns a finishedResponse:NativeHttpFetchmapsNativeHttpFetchEnvelope(streamingIdvs idle-completebody/bodyBase64)LynxFetchModulemapsLynxFetchSuccessPayloadincludinglynxExtension.streamingIdHostFetchkeeps the identifier Fetch body and does not inspectResponse.lynxExtension.streamingIdOne internal constructor:
syncStreamResponse({ bytes } | { streamingId } | { streamingFallback: true }). The fallback variant is the existing nameless GlobalEventEmitter path (left for the stacked T2 agent).enterEarlyCapture()is removed fromLynxRemote. OnlyNativeHttpFetchowns early capture (preserves #36 abort / retirement / multi-emitter / overflow).response.tsexports shrink to three functions:syncStreamResponsestabilizeStreamingResponsestabilizeJsonResponsePlus the constructor init type
SyncStreamResponseInit. Dropped fromoxlint.config.tsignore:bytes.ts,events.ts,response.ts.T4 — Name NDJSON header policy
headerMapis a copy-only shape conversion.preferNdjsonAccept(BSON Accept → NDJSON, defaultAccept-Encoding: identity) runs atsyncStreamRequestFromFetch. Behavior is unchanged for/sync/streamrequests.Tests
lynxExtension.streamingId(getter trap + ignored custom stream name)headerMapdoes not rewrite Accept; the named seam doesVerification
pnpm typecheck— passpnpm lint— passpnpm test— 112/112 passmake test— native SQL RPC + shared NDJSON fixture checks passPaste-ready comment for #34
GitHub issue write access was not available from this agent (
gh issue view 34/ issue list both 403). Suggested comment: