Skip to content

fix(transport): honor backpressure in pinned HTTP responses - #7667

Merged
lidge-jun merged 10 commits into
lidge-jun:devfrom
luvs01:fix/pinned-http-response-backpressure
Oct 25, 2026
Merged

lidge-jun merged 10 commits into
lidge-jun:devfrom
luvs01:fix/pinned-http-response-backpressure

Conversation

@luvs01

@luvs01 luvs01 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

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 head b1b00300b32248b96be3e25db57e2b0c474e6578, this candidate normally merges dev@0aeaf0cb6b0a7c2f117d8c75f8fa396cf2ea6e39 and shared #7627 (f011a94be1b468b7b785cb54976d4cb4a9b6a563). The PR remains based on dev.

Runtime Bun and testRunnerBun are 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: only package.json's runner pin changes; root bun.lock, gui/package.json and gui/bun.lock match 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 --check passed. 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=all promotion 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

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

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

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

luvs01 and others added 4 commits October 24, 2026 16:44
# Conflicts:
#	structure/transports/byte-accounting.md
#	tests/claude-integration/claude-picker-upload.test.ts
@lidge-jun
lidge-jun marked this pull request as ready for review October 25, 2026 06:47
@lidge-jun

Copy link
Copy Markdown
Owner

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.

@lidge-jun
lidge-jun merged commit 6672cfb into lidge-jun:dev Oct 25, 2026
62 of 64 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T06:48:40.531290Z
We couldn’t complete this review. Comment @codex review to try again.
e0c80d2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants