Skip to content

fix: bound TLS and HTTP setup and reclaim transport resources - #13

Merged
abruption merged 3 commits into
mainfrom
fix/setup-deadlines
Oct 14, 2026
Merged

abruption merged 3 commits into
mainfrom
fix/setup-deadlines

Conversation

@abruption

@abruption abruption commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Fixes #5

Adds 15-second per-stage setup deadlines (absolute for header reads) and a 64 KiB header bound. Covers initial/upstream CONNECT, both TLS handshakes, HTTP response and WebSocket Upgrade. Retains the response deadline through informational 100/103 responses, including coalesced final headers/body. Own sockets before TLS handshake and explicitly shut down/close both endpoints on every exit, including failure to start a worker. Join bridge workers after shutdown; established long-lived streams have blocking timeouts restored. Forward ordinary HTTP upload bodies concurrently while awaiting the first response.

Tests use isolated socket peers and temporary self-signed certificates only. Cover silent peers, TLS stalls, early client EOF while awaiting 101, slow header trickle, oversized headers, failure cleanup, normal uploads, interim-response stalls, idle established raw/WebSocket streams, and existing payload/ping/close/EOF cases. No production fault injection, service or network changes.

Local: 33 shim tests pass; full 66-test suite has only the pre-existing sandbox AF_UNIX permission error (65 pass). CI runs the complete suite on Python 3.11/3.13 and ShellCheck. Independent branch based on main; no dependency on PR #12.

Scope: deadlines bound network setup stages; DNS resolver and local certificate-generation latency are not a global connection-setup SLA. A client that disconnects while awaiting upstream 101 is reclaimed by the bounded Upgrade deadline.

Verified CI on head 8713429ac9052461c6432f5af4784dce674f1507: Python 3.11 and 3.13, 66 tests each, plus Bash syntax and ShellCheck passed. Workflow run.

@abruption
abruption marked this pull request as ready for review October 14, 2026 12:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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 ✅ Completed 2026-10-14T12:38:13.434851Z 8713429 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-14T12:38:55.719871Z 8713429 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.

@abruption
abruption merged commit bfcef53 into main Oct 14, 2026
10 checks passed
@abruption abruption mentioned this pull request Oct 14, 2026
@abruption
abruption deleted the fix/setup-deadlines branch October 14, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: shim TLS·Upgrade 준비 단계에 deadline과 연결 정리 추가

1 participant