ReviewOS

home-lang/home

Complete nested HTTP proxy transport failure and bypass lifecycles

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

Scope

Finish the remaining reduced-adapter HTTP proxy transport/lifecycle paths exposed by Node common.mustCall and referenced-handle enforcement in 2edc96ed2.

Current unchanged copied corpus cases:

  • test-http-proxy-request-https-proxy.mjs — exceeds a 20-second isolated timeout;
  • test-http-proxy-request-no-proxy-port-specific.mjs — exceeds a 20-second isolated timeout;
  • test-http-proxy-request-proxy-failure-500.mjs — exceeds a 20-second isolated timeout;
  • test-http-proxy-request-ipv6.mjs — target handler expected once, actual 0.

Control evidence

The same adapter and import path pass these callback-heavy controls:

  • test-http-proxy-request-invalid-url.mjs;
  • test-http-proxy-request-connection-refused.mjs;
  • test-http-proxy-request-max-sockets.mjs;
  • test-http-proxy-request-socket-keep-alive.mjs;
  • NO_PROXY asterisk/domain/IP/basic cases.

This narrows the remaining work to nested HTTPS proxying, port-specific bypass/mismatch routing, target-reset-to-500 propagation, and IPv6 authority routing.

Acceptance criteria

  • Correctly route IPv6 authorities through the proxy and invoke the target exactly once.
  • Honor port-specific NO_PROXY matches and mismatches without recursive request dispatch.
  • Propagate target ECONNRESET to the proxy and produce the expected well-formed 500 response.
  • Complete HTTPS proxy transport and close all referenced resources.
  • All unchanged upstream assertions, callback counts, headers, logs, deadlines, and workloads pass.

Tracked from #66 and related to #628.

10 days ago

Fresh evidence after b1fa1d017: test-http-proxy-request-ipv6.mjs still fails independently with an empty proxy log and the target handler never invoked. The general test-http-proxy-request.mjs also remained active for more than two minutes in a four-file batch and was interrupted; removing that case made the sanitized-URL, max-sockets, and socket-keep-alive batch finish in under one second with zero failures. This keeps the remaining defect isolated to the nested routing/lifecycle scope here, not the URL preprocessing or Agent header semantics fixed in #629.

10 days ago

Resolved by 0eeca8a4e. Valid IPv6 literals now bypass DNS label validation, while malformed hostnames retain their asynchronous DNS errors. Requests with agent: false no longer inherit NODE_USE_ENV_PROXY, eliminating nested proxy recursion. The five unchanged acceptance cases listed here pass together in 0.6 seconds with zero failures and zero unsupported; the formerly hanging general proxy test also passes independently in 0.1 seconds.

Sign in to comment on this issue.