Repository navigation
fix(transport): honor backpressure in pinned HTTP responses - #7667
Conversation
Propagate source and decoded consumer pressure to socket delivery and pause inactivity timing while local queues are full. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
…7667-dev-bd5-20261024
…7667-dev-0ae-7627-20261025
…7667-dev-0ae-7627-20261025
# Conflicts: # structure/transports/byte-accounting.md # tests/claude-integration/claude-picker-upload.test.ts
|
Integration evidence (owner decision decision:b607a677, approved): after #7627 landed the maintainer merged origin/dev into this branch, leaving only this PR's own change (pinned HTTP response backpressure (src/lib/pinned-http.ts)); independent gpt-6.1-sol review PASS at exact head e0c80d2. Exact-head PR CI run 40156632819 and exact-head ci.yml lane=all run 40156925544 (maintainer mirror branch at this SHA) both succeeded. Static merge simulation on current dev c203c86 (this Mac): dev=c203c86859c73f4a2e29ff8399ae57584a1da0b6 base=323a5e11772c38c15b271d23c7696c5947bb97da pr_files= 7 overlap=[]; merge clean; install exit=0; gui install exit=0; tsc exit=0; tsc doctor exit=0; structure:check exit=0; privacy:scan exit=0; layout+ratchet guards exit=0 54 pass 0 fail ; Merged by the triage manager as maintainer integration (MAINTAINERS.md, dev only) with green exact-head PR CI, an independent review PASS, and the owner's approval of this bundle. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
Propagate response-queue pressure to the pinned HTTP socket so an unread consumer does not keep accumulating incoming data. Identity, gzip and deflate responses pause socket input until consumers resume. The inactivity timer pauses only during local backpressure and is re-armed when input resumes; cancellation, abort and terminal errors still release the connection.
Keep DNS/address pinning, TLS validation, deadlines, framing and coded/decoded byte caps unchanged. A single compressed chunk can still expand inside the native decoder: this is not a decoder-allocation or process-memory ceiling. Source commit:
26e403e4ecdb24bcdeb39ff08665ca8fb361ae4a.Verification
Candidate HEAD:
0990f04fb9fa2544cfa48ee68da2316d1f370959. Starting from published headb1b00300b32248b96be3e25db57e2b0c474e6578, this candidate normally mergesdev@0aeaf0cb6b0a7c2f117d8c75f8fa396cf2ea6e39and shared #7627 (f011a94be1b468b7b785cb54976d4cb4a9b6a563). The PR remains based ondev.Runtime Bun and
testRunnerBunare both 1.4.4. Source review verified the published-head ancestry, own changes and the shared 11-file delta. The four dependency inputs preserve dev's security baseline: onlypackage.json's runner pin changes; rootbun.lock,gui/package.jsonandgui/bun.lockmatch dev. They specify zod 4.6.6, root TypeScript 7.0.2, and GUI locked happy-dom 21.0.4 / TypeScript 6.0.3. Source input verification is separate from the exact-head execution results below.Current exact-candidate Windows validation used official Bun 1.4.4 with the normal repository preload and loopback/fake fixtures: 32 pass, 0 skip, 0 fail across 3 focused files (
tests/lib/pinned-http.test.ts,tests/lib/pinned-http-content-coding.test.ts,tests/images/pinned-https-get.test.ts). Each file ran with--isolate --timeout 60000.Root TypeScript, Structure and skill-surface checks passed. Scoped privacy checks covered 18 changed files (own scope plus shared #7627); the file-size ratchet checked 17 applicable files, with no findings or offenders. Unchanged sparse paths were excluded. All 7 execution units returned native exit 0 and reached child EOF;
git diff --checkpassed. Existing installed security dependencies were verified and reused, with no install, source or lockfile change. This is Windows focused proof only; unchanged shared #7627 TLS/runner units were not repeated.The production/test blobs are unchanged from the published head. The seven-file own scope is preserved; the transport inventory and Korean provider reference also retain dev's eventstream and provider-policy updates.
Earlier official Bun 1.4.4 Windows coverage passed 40 tests across pinned-HTTP, content-coding, HTTPS image and adjacent null-body/cap/deadline suites. Real loopback regressions cover repeated pause/resume, exact decoded bytes, inactivity re-arming and paused cancel/abort/reset cleanup; the unchanged-source control fails the unread-response regression. Earlier TypeScript/Structure checks, source review and Bun 1.4.3 CI remain historical evidence, with conditional platform jobs skipped. Existing installations were used; a later published-head check verified its dependency inputs. These historical runs do not substitute for the exact-candidate checks above.
Full platform coverage, a real TLS backpressure exchange and live-provider behavior remain unverified. A single coded chunk can still expand inside the native decoder; socket backpressure does not establish a decoder-allocation or process-memory ceiling.
Exact-candidate upstream CI and the full cross-platform
lane=allpromotion proof remain pending. Focused tests do not replace that proof. Draft status tracks the outstanding verification; maintainer review/approval before merge is a separate step.Checklist
Keep Draft pending fresh upstream checks. Source review and focused tests do not constitute maintainer approval.
Co-authored-by: luvs01 27862058+luvs01@users.noreply.github.com