Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
Size Report
Startup median (7 runs, lower is better):
Affected plugins
|
cdee673 to
c0fa010
Compare
This comment has been minimized.
This comment has been minimized.
|
At 2fa24d9, local lease and leased commands over HTTP regress when they carry a tenant. This needs a fix before merge. http-authorization.ts:68: Not blocking: these can be taken or left: load the deadline in daemon-proxy.ts:34 lazily like the body budget (or build it inline with Could the deadline be smaller: one shared constant, an The Coverage and Repo Guards failures look related to this change. The proxy eager-closure budget fails because of the static import, and the daemon credential composition test and provider-scenario integration tests send hookless loopback requests with Not verified here: tests were not run, job logs were not read, and the upload failures were not confirmed on the base branch. The tenant impact assumes a local CLI using HTTP or dual server mode, and the byte-pool concern comes from reading the code. Before merge, the tenant check needs to be reverted or moved to a transport-based rule, the proxy budget failure needs a fix, and CI needs a new run. |
2fa24d9 to
b339cf2
Compare
b339cf2 to
9b8070c
Compare
|
Fixed the blocking loopback regression in The proxy preauth deadline now loads only on the RPC path, addressing the eager-closure import failure. I updated the security documentation and PR body to remove the direct-tenant restriction claim. CI is pending at this head; the ADR 0006 wire-compatibility failures remain inherited from the stack base. The other suggestions in this comment remain optional follow-up work. |
This comment has been minimized.
This comment has been minimized.
6f5fdaf to
630af4f
Compare
|
At 630af4f, the loopback regression from the earlier review is fixed, and no new code problem needs a change. Remote restrictions again depend only on a configured auth hook or the network-access marker (http-authorization.ts), and the original test again expects a local Repo Guards and Coverage failures look unrelated to this change. They report wire-compat changes in upload and artifact declarations that this PR does not touch, and the base commit f97e504 from #5281 fails with the same annotations. The earlier eager-closure, credential composition and provider-scenario failures are gone, and one other check is still in progress. Not verified here: tests were not run locally. The focused RPC validation and script admission tests are absent from the failing annotations, which suggests that they passed in CI. The pending live remote and device evidence and wire review belong to #5281. Nothing more is needed in this PR. Before CI can pass, #5281 must resolve the wire-compat failures under ADR 0006, either with a |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 630af4f. 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 e0096e3. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
The code at c29cc21 is ready on behavior, but one CI failure from this change must be fixed before merge. Since the review of 630af4f, preauthorization expiry has a typed, documented reason in both the daemon and the proxy. In Coverage, the eager-closure budget check fails because daemon-proxy.ts now statically imports the new Not blocking: the daemon reason can be taken or left, but its comment and These threads no longer apply and can be resolved: daemon refusal reason is fixed, with a typed reason and The other Coverage failures (wire-mutations and Not verified here: tests were not run locally, and passing status for the changed tests is inferred from their absence in the failure annotations. Repo Guards stopped at the wire comparison, so "Check for production-unused exports" was skipped at this commit. |
|
Addressed the eager-closure regression in 14688d4: |
This comment has been minimized.
This comment has been minimized.
|
No code problems were found at 14688d4. The earlier eager-closure-budgets failure is fixed, and that annotation no longer appears in Coverage. Both earlier threads are fixed and can be resolved: the daemon preauth refusal still carries The remaining Coverage failures ( Not verified here: the changed tests were not run locally, and their passing is only inferred from their absence in the Coverage failure annotations. "Check for production-unused exports" was also skipped because Repo Guards stopped earlier. Before merge, the wire-compat and wire-mutations failures from #5281 need an ADR 0006 bump or a ledger acknowledgment on the base. |
14688d4 to
db1dfe8
Compare
db1dfe8 to
d60d53b
Compare
This comment has been minimized.
This comment has been minimized.
|
At 08fb3a0, the timeout limit and tenant confinement assertions from the earlier review are fixed, but the live evidence still needs to cover the merge head. The existing inventory overlap and install receipt cover different observations, and the focused reports do not provide a combined listener receipt. Before merge, attach merge-head evidence for native dispatch overlap through both listeners. Use isolated integration coverage to verify that each refusal comes from the intended listener, preserves its typed status and retriable and dispatch flags, and allows a fresh call after release. The current daemon fixture injects dispatch and the proxy fixture injects upstream transport. Listener admission The five open inline threads can be resolved: preauthorization accounting covers the intended preauthorization count; response socket handling closes the connection; timeout length is fixed at head; late authorization is stopped before forwarding; and confinement assertions are fixed at head. No lower-priority threads still apply. The latest GitHub check snapshot for 08fb3a0 reports 19 passed, with no pending or failed checks. No conflicts are known. Not verified here: the reported device and focused test runs were not independently executed, and their raw logs were not supplied. Static tracing establishes the route from the shared HTTP client through the proxy, daemon runtime, and backend handoff. |
|
GitHub reports 19 passing checks for The two-listener inventory overlap remains attributed to |
|
Partial follow-up to the listener and native-dispatch evidence request at
|
This comment has been minimized.
This comment has been minimized.
da47926 to
2eedab2
Compare
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/proxy/src/daemon-proxy.ts:219 |
🆕 handleRpcRoute builds const signal = AbortSignal.any([request.signal, preauth.signal]) and passes it to `authenti… |
packages/proxy/src/daemon-proxy.ts:234 |
🆕 handleRpcRoute re-sends an envelope refusal after the 408 already answered |
Reviewed with this repository's own Sentinel configuration (7c6ef4a2ed46).
💬 Talking to Sentinel
In a finding's thread, reply with:
| 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.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 2eedab2. The verdict and the full list are in the summary comment.
- 🟡 Minor · handleRpcRoute re-sends an envelope refusal after the 408 already answered ·
packages/proxy/src/daemon-proxy.ts:234
| const rpcBody = ingress.body; | ||
| // The checked route checks its envelope after authentication and the protocol: a caller on | ||
| // another protocol is told so before the proxy reads what its own protocol defines. | ||
| const envelopeRefusal = | ||
| route === DAEMON_HTTP_CHECKED_RPC_ROUTE ? null : refuseInvalidRpcEnvelope(rpcBody); | ||
| if (envelopeRefusal) return envelopeRefusal; | ||
| try { | ||
| return await handleDaemonRoute(request, route, options, instanceId, rpcBody); | ||
| } catch (error) { | ||
| return rpcErrorResponse(readJsonRpcId(rpcBody), error); | ||
| const caller = await authenticateCaller(request, options, rpcBody, signal); | ||
| signal.throwIfAborted(); | ||
| clearTimeout(deadline); | ||
| deadline = undefined; | ||
| return await handleDaemonRoute(request, route, options, instanceId, rpcBody, caller); |
There was a problem hiding this comment.
🆕 🟡 Minor · handleRpcRoute re-sends an envelope refusal after the 408 already answered
Sequence: the RPC body arrives at t=4.9s, the preauth deadline fires at t=5s and writes the 408 (res.writableEnded true), then the stalled body read resolves read(). handleRpcRoute runs refuseInvalidRpcEnvelope(rpcBody), gets a refusal for a malformed body, and returns it as a Response with no write guard — signal.throwIfAborted() sits only on the success path below it. Every other answer path in this function gained an aborted-response guard in this PR, but the envelope-refusal path was missed; add the same guard before returning the refusal.
Details
Also raised here
Also raised at this location by persona maintainability: void reader.cancel().catch(() => {}) is applied to the two error paths that leave read() but not to the signal-ca… — void reader.cancel().catch(() => {}) is applied to the two error paths that leave read() but not to the signal-cancellation path just above it, which still awaits the cancel inside awaitWithSignal's cleanup. A stalled request body whose cancel() never settles therefore still wedges the cancellation path for the very reason those two lines were changed — the cancel is fire-and-forget only where handleRpcRoute's own deadline already races it. Make all three paths non-blocking, or drop the two voids so one rule covers the function. Same asymmetry as the await/void split in the two new tests around a hanging cancel().
persona: javascript, maintainability
Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.
Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.
Summary
The daemon and proxy share a five-second preauthorization deadline for the RPC body and authentication. The daemon caps concurrent preauthorization and releases each slot before dispatch. The existing buffered-byte budget remains through execution. Hookless loopback remains local. Stacked on #5281.
Before / after
dispatched: noand preserves a bounded, valid RPC ID when the body has arrived.Validation
At
da479265c9, all four focused ingress tests passed with loopback required. Both production HTTP listeners and the default proxy upstream transport verified retriable 408s from proxy and daemon authentication. Each refusal preserved its RPC ID and reporteddispatched: no. A fresh RPC reached the fixture handler after each timeout. Daemon-capacity 503 and overlapping native dispatch remain open.At
08fb3a0b6f, all eight script admission tests and all 19 hosted checks passed.At
bb5053d270, all 14 previous patches match by range-diff after rebasing onto #52810cd48fbd30. The follow-up shares the timeout-only ID limit. All 14 proxy cancellation tests passed, including a late auth completion with zero upstream calls. All 19 hosted checks passed.At
2c6b09defd, all 19 hosted checks passed. The iOS 26.2 receipt at that combined tip observed two successful overlapping inventory RPCs through the production proxy and daemon listeners.2eedab287apassed merge-tree. CI pending.