Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on ba68e94. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on a4a0f5c. The verdict and the full list are in the summary comment.
|
The PR is ready at a4a0f5c: the code review found nothing that must change. Hosted CI is still running at this commit, so the checks must go green before merge. No conflicts. Not blocking, and each can be taken or left: (1) the phase-timeout details.networkErrorCode values (connect-timeout, header-timeout, body-timeout) in install-source-download.ts duplicate details.transferPhase and add an error contract to a transport swap that #4674 asks to keep behavior-neutral, so dropping them and the matching docs sentence would keep it neutral; (2) the transport catch at line 131 can be the base rule, rethrow any AppError and wrap the rest, because requestApprovedUrl throws only plain Errors; (3) the CI Size Report at ba68e94 shows no core saving (download +66 B), so the PR body should quote those numbers and the saving can be measured once #4846 takes Limrun out of core; (4) the TransportSubject indirection and the separate proxy-auth lab in the new fixtures could call requestApprovedUrl directly and share the loopback lab; (5) the comment at line 16 about the CLI eager import closure looks stale, since no provision-kit file is in that closure. The earlier inline thread on the DNS error handling no longer applies at a4a0f5c: approval now runs in its own try and rethrows the refusal unchanged, and a new test covers ENOTFOUND, so it can be resolved: #4958 (comment) Not verified here: any test run, the packed bundle contents, the Node CONNECT and TLS tunnel behavior, and a real-internet or corporate-proxy run, since the author smoke test is loopback. |
This comment has been minimized.
This comment has been minimized.
|
The DNS approval error and the typed cancellation findings are fixed at 22cff6b, but the new transport drops ALPN negotiation, so some HTTPS downloads that work today will fail. The origin The PR text says the Node HTTP downloader preserves the base branch's TLS negotiation behavior for HTTPS origins and HTTPS CONNECT proxies. That does not hold at head, as shown above. The ALPN fix makes the claim true, so no wording change is needed once it lands. Could Both earlier inline threads on DNS approval errors (#4958 (comment)) and on typed cancellation (#4958 (comment)) no longer apply. Approval now rethrows the refusal unchanged, and All 21 checks pass at 22cff6b. Not verified here: the new cancellation test failing without the fix (this rests on reading the old predicate and |
The Node HTTP transport handed `tls.connect` and the HTTPS CONNECT request no `ALPNProtocols`, while the base Undici connector offered `http/1.1`. An origin or proxy that requires a negotiated protocol now refuses a transfer that used to work. Offer `http/1.1` on the origin connection and on the proxy CONNECT request. The loopback TLS origin and the TLS CONNECT proxy advertise `http/1.1`, so each handshake reports what the transport offered: the origin echoes the negotiated protocol, and the proxy records it at `secureConnection`. Dropping either production option fails that leg's assertion.
|
ALPN is back on both TLS legs at 39fc971. Production
Both use one module constant, Assertions on both legs The two TLS servers in the existing loopback fixtures now advertise
Each assertion fails without its own fix Measured in a disposable checkout at 22cff6b with
So the two legs are detected independently: no single assertion covers both, and no proxy-leg assertion can be satisfied by the origin option. Checks: On the |
This comment has been minimized.
This comment has been minimized.
|
The ALPN problem from the earlier review (#4958 (comment)) is fixed on both TLS legs at 39fc971, with independent loopback assertions. One defect remains: An Could the existing loopback fixture own proxy-listener setup, socket tracking and settling for both labs, with the auth suite supplying only its CONNECT handler and TLS handshake observations? The two earlier inline threads on approval handling (#4958 (comment)) and on signal-failure rewriting (#4958 (comment)) are fixed at 39fc971, so they can be resolved. All 21 checks pass at 39fc971, and there are no conflicts. Not verified here: the author's 4/3/2 revert matrix and any test run. That each ALPN assertion fails without its own option rests on reading the code and on Node's documented behavior. Also not verified here: any run against a real ALPN-enforcing origin or corporate HTTPS proxy, since all evidence is loopback. The SOCKS defect must be fixed before merge. The core saving that #4674 asks for still depends on #4846, as noted in the first round. |
…transport #4674 replaced the Undici-backed install-source transport with a Node HTTP client that only built HTTP(S) CONNECT tunnels, so a `socks5://` or `socks://` proxy URL began failing with "Unsupported install source proxy protocol". Route both SOCKS schemes through the maintained `socks` client and hand it the approved address as its destination, so the tunnel is built for the address the resolver already vetted and the URL host is never resolved again. The proxy credentials come from the proxy URL's userinfo, matching what the previous `ProxyAgent` accepted. The transport owns the dial to the proxy, so a proxy that is down fails with the socket's own errno code, and aborting the caller signal destroys the socket mid-handshake and rejects with the caller's reason. `socks` is imported on this route only and bundled, so a download that names no SOCKS proxy never evaluates it. Add a loopback SOCKS5 lab that speaks RFC 1928 plus the RFC 1929 method and records the destination each tunnel request names, and cases that pin the approved-address destination, the artifact bytes, credential forwarding, a refused tunnel, and an abort mid-handshake. Fold the duplicated origin, socket tracking and settling of the loopback and proxy-auth labs into a shared base.
|
SOCKS is restored at 0296f04, and the two labs now share one lifecycle owner. The SOCKS tunnel route
Loopback tests — install-source-network-transport-socks.test.ts The lab's proxies speak RFC 1928 plus the RFC 1929 method over raw sockets (install-source-network-transport-socks.fixtures.ts#L245) and record the destination bytes each tunnel request names, which is the assertion the previous route failed:
All seven SOCKS cases fail without the fix, for the intended reason: with the SOCKS dispatch removed, the two tunnel cases, the credential case and the abort case reject with Shared fixture lifecycle
Size The bundled core grows by one lazily-loaded chunk: Verification
The two inline threads on approval handling and signal-failure rewriting can be resolved. |
This comment has been minimized.
This comment has been minimized.
|
At 0296f04, the two earlier findings from the first review (39fc971) are fixed, but one new high-priority defect remains on the SOCKS route. All 21 checks pass at 0296f04, and there are no conflicts. connectThroughSocks5Proxy registers The rule is that every await on the SOCKS route must settle when the signal aborts. The smallest change is The two open inline threads (#4958 (comment) on approval refusals, and #4958 (comment) on signal failures) no longer apply at this head, so they can be resolved. Not verified here: the PR test suites were not run, and green CI is the only evidence for them. The hang was reproduced with a standalone Node script that has the same Before merge, the SOCKS abort hang must be fixed and covered by the new test. |
The SOCKS route awaited `once(socket, 'connect')` without the caller signal, so a proxy whose TCP dial never completes left the connect-phase wait unsettled on abort: `socket.destroy()` without an error emits `close`, and `once` rejects only on `error`. An install-from-source through an unreachable `socks5://` or `socks://` proxy hung forever, so the connect-phase watchdog and an operator cancel never ended the command. Hand the signal to the dial's own `once`, so that await settles with the caller's reason the way the request and body awaits do, and keep a no-op error listener for the abandoned socket: `once` drops its own error listener as soon as the abort wins the race, and a late socket error after that would be unhandled. Cover the dial with a case that dials a blackholed address under a short operator cancel and asserts the caller's error and a destroyed socket. Without the signal the case reports the harness's `hung` outcome instead of a rejection.
|
Fixed in
Test: install-source-network-transport-socks.test.ts:144 dials Proof it catches the defect: with The two open inline threads are resolved. One answer to your "not verified" list: the new case does not depend on the 30 s |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
Summary
Use Node HTTP and TLS for app-source downloads in provision-kit. Keep approved-address pinning, URL-host TLS checks, scoped HTTP and HTTPS CONNECT proxies, redirect validation, streaming limits, and cancellation. Limrun’s SDK still bundles Undici on the 0.22 base.
Part of #4674.
Before / after
A reset while streaming previously failed without a network error code. It now returns
COMMAND_FAILEDwithdetails.networkErrorCode: ECONNRESET. The same field carries system errors while waiting for headers and phase timeouts asconnect-timeout,header-timeout, orbody-timeout. Caller cancellation has its own outcome. Failed downloads remove the partial file.Matched
pnpm sizeagainstdcbf9d8bfa: 206 bytes smaller compressed and 1,931 bytes larger unpacked and installed. The Undici code moves to Limrun’s tunnel chunk. The larger reduction depends on #4846.Validation
At
ba68e9445d, 79 focused tests passed on Node 22.22.2. Packed smoke verified pinned CONNECT, artifact cleanup, and truncated-body errors.pnpm check:affected --run --base origin/0.22 --head HEADpassed all locally runnable gates. GitHub runs the hosted-only checks.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.