ReviewOS

home-lang/home

Complete HTTPS proxy tunnel failure and reuse lifecycles

#631
Closed chris opened this 10 days ago ·
10 days ago

Scope

Finish the remaining reduced-adapter HTTPS client proxy tunnel and lifecycle semantics after HTTP proxy recursion was fixed in 0eeca8a4e.

The complete HTTP proxy tranche now passes 30 unchanged .mjs files. Of 17 HTTPS proxy files, 10 pass and these 7 remain:

  • test-https-proxy-request-auth-failure.mjs — pending async test promise;
  • test-https-proxy-request-handshake-failure.mjs — pending async test promise;
  • test-https-proxy-request-incomplete-headers.mjs — pending async test promise;
  • test-https-proxy-request-max-sockets.mjs — two referenced HTTP servers remain open;
  • test-https-proxy-request-socket-keep-alive.mjs — two referenced HTTP servers remain open;
  • test-https-proxy-request-tunnel-timeout-agent.mjs — pending async test promise;
  • test-https-proxy-request-tunnel-timeout.mjs — pending async test promise.

Control evidence

The same 17-file batch passes connection refusal, HTTPS proxy routing, invalid option and URL handling, invalid credentials, IPv6, NO_PROXY, ordinary request, and HTTPS POST cases. The HTTP proxy tranche passes 30 of 30.

Acceptance criteria

  • Propagate proxy authentication, handshake, incomplete-header, and timeout failures with the exact upstream error contracts.
  • Respect Agent tunnel timeout and default tunnel timeout ownership.
  • Queue and reuse HTTPS proxy sockets under finite maxSockets and explicit keep-alive.
  • Close proxy and target servers plus all tunnel/request resources.
  • All 17 unchanged HTTPS proxy files pass with zero unsupported; do not change fixtures, assertions, deadlines, or workloads.

Tracked from #66.

10 days ago

Resolved by 36b99ce78 (fix(test): complete HTTPS proxy tunnel lifecycles). Home now parses complete CONNECT response envelopes, sends Basic proxy authorization, propagates non-200 and premature-end failures, preserves pending tunnels under request or Agent timeout ownership, verifies tunneled target trust, and reuses established tunneled Agent sockets without repeating CONNECT. Simulated child requests now use the protocol-correct Agent, preserve synchronous versus asynchronous exit status, serialize Error codes, and release per-process Agent state. The permanent 17-file HTTPS proxy tranche and the existing 30-file HTTP proxy tranche both pass with zero failures and zero unsupported.

Sign in to comment on this issue.