Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 46ec0c3. The verdict and the full list are in the summary comment.
- 🟡 Minor · Always-truthy remote wrapper defeats the admitDevice guard in createRequestDeviceAccess ·
packages/daemon/src/server/request-execution-scope.ts:806 - 🟡 Minor · Reason casing breaks the SCREAMING_SNAKE convention of its own table ·
packages/daemon/src/server/remote-host-input-policy.ts:12
46ec0c3 to
7d6c9cd
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 76f5511. The verdict and the full list are in the summary comment.
- 🟡 Minor · Updated confinement doc names assertRemoteWebDeviceAdmitted, which does not exist in the code ·
docs/experiments/remote-web-public-network-confinement.md:188
|
The code at cc563e6 does not yet hold the public-network-only rule on every route that reaches an existing web session. A remote caller can still drive the host browser through replay. An authenticated public-network-only caller can send A second independent pass found that record stop has the same gap. A proxy client bound to the same session and tenant can stop a live daemon-owned recording on an unleased web session (record-runtime.ts:519). The stored handle stops the managed browser recorder without a runtime bind, and the reply can publish the recording at :469. The rule above covers it if it is enforced on the resolved session before the record plan, manifest checks or handle use. Close teardown can stay on its cleanup path. A second independent pass found that reopen renews the device claim before it refuses. A proxy caller reopening an unleased local web session with an HTTP(S) target writes a fresh claim timestamp (session-open.ts:300, device-claims.ts:758) before the refusal at :315, so a refused reopen keeps the local claim alive. The same early check should run before the claim write. A second independent pass found that a refused snapshot is not side-effect free. The journal starts before runtime inspection refuses the request (request-execution-scope.ts:600), and :715 still writes A second independent pass found that a duration-only Same size or smaller: could one exported assertion, for example Not blocking, and each can be taken or left: record stop, trace and runtime reads are covered by the session-level check above; a bounded batch with a web audio probe step meets the composite resource refusal before the web refusal, which the earlier check order fixes; sensitive-fill redaction can rewrite part of The earlier inline thread on remote-proxy.md:161 still applies, because that sentence is false for replay until the fix lands: #5348 (comment). No lower-priority threads still apply. These look fixed at cc563e6 and can be resolved: the predecessor guard wrapper in request-execution-scope.ts (#5348 (comment)), the reason name REMOTE_WEB_PUBLIC_NETWORK_UNENFORCED (#5348 (comment)), the experiments doc naming #5348 (#5348 (comment)), the Not verified here: any behavior by running it. No test was run, and the replay route was traced by reading code. Not verified here: whether the web interactor without a request provider snapshots the session's own browser or starts the default one; either way it drives a managed browser on the daemon host. Not verified here: whether tenant namespacing stops an auth-hook tenant from naming an unleased local session in production, which the PR's own existing-session test assumes. Not verified here: every handler that skips device binding; only replay, record stop, trace, runtime, journal and bounded audio were checked. CI is pending: 17 checks pass at cc563e6, and one other check is still queued. It is a review check, not a test job. No conflicts are known. Before merge, a remote request on an existing web session needs to be refused before any handler runs, with the router test that shows zero snapshot calls on remote replay. |
This comment has been minimized.
This comment has been minimized.
… dispatch seam assertRemoteWebDeviceAdmitted now runs in runAdmitted on the resolved session device, before composite resource admission, lease admission, the journal, and any handler. This closes replay divergence capture, record stop, reopen claim renewal, duration wait, and the idle activity stamp.
|
Answers to the review at 30cd7eb:
|
This comment has been minimized.
This comment has been minimized.
|
The five problems from the earlier review (#5348 (comment)) are fixed at 30cd7eb: replay capture, record stop, reopen claim renewal, journal and idle stamp, and duration wait are all refused by the new check in request-execution-scope.ts:633, and the requested router replay test is present. A second independent pass found three regressions in that same check: it refuses requests that never use a browser. A second independent pass found that an authenticated remote caller on a token-authenticated daemon without tenant isolation now gets REMOTE_WEB_PUBLIC_NETWORK_UNENFORCED from A second independent pass found that lease operations and artifact listing hit the same collision. A remote caller with a valid daemon token who uses an address held by an unleased web session cannot allocate a native-device lease, or heartbeat or release one it already holds. These commands ignore the session's lease (registry.ts:168, :186, :205) and act on the caller's lease scope (lease.ts:101, :120, :213, :402). A second independent pass found that an explicit device selector loses its precedence. An authenticated remote caller sends For validation, a router test per route is enough: an unleased web session at the address, then The six earlier inline threads no longer apply, because each is fixed at this head, and the author can resolve them: remote-proxy.md now says remote web browser use is refused (#5348 (comment)); the predecessor guard wrapper is gone (#5348 (comment)); the reason is now REMOTE_WEB_PUBLIC_NETWORK_UNENFORCED (#5348 (comment)); the experiments doc status names #5348 (#5348 (comment)); the router tests assert The checks at 30cd7eb show 18 passing and one cancelled, "Body rules", which lints PR text and not code, so it is likely unrelated. There are no conflicts. Before merge, the three regressions above need a fix and the router tests described above need to pass in CI. Not verified here: that the replay test fails without the new check, and whether an auth-hook tenant can name an unleased local web session in production. No test was run for this review. |
… use the session device Commands that ignore the session lease (devices, session_list, lease operations) already declare that they do not use the session device. artifacts and doctor --remote now declare it with detachedFromSessionDevice. capabilities and apps with an explicit device selector keep explicit-device precedence. The dispatch seam checks only the device the command uses.
|
Addressed in e43a25e:
|
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.
|
The three findings from the earlier review are fixed at 52126c9, and the new changes add no problems. The early check now lives at remote-host-input-policy.ts:240 and runs from request-execution-scope.ts:632. The refusal reason is All six open inline threads are fixed at this head, so the author can resolve them: predecessor guard, reason code, remote-proxy.md, experiments doc status, retriable in tests, and assertRemoteWebDeviceAdmitted. CI is green at 52126c9: 18 checks, none failing. Not verified here: tests were not run locally, and the red-without-fix result for each test row is inferred from reading the early check at 30cd7eb, not from a mutation run. |
Summary
A remote tenant request (internal
publicNetworkOnly) cannot use the managed web browser on the daemon host, because that browser could reach the host's private network. A remote command that would use it is refused withUNSUPPORTED_OPERATION, reasonREMOTE_WEB_PUBLIC_NETWORK_UNENFORCED,retriable: false.closestays allowed for cleanup. Local web sessions are unaffected.The dispatch seam (
runAdmitted) checks an existing session's device before composite resource admission, lease admission, the session journal and any handler. Device admission checks devices resolved later, such as a freshopen. The early check skips commands that do not use the session device: commands that ignore the session lease (devices,session_list, lease operations), and the new registry fielddetachedFromSessionDevice(artifacts,doctor --remote).capabilitiesandappswith an explicit device selector keep explicit-device precedence. This replaces the web part of #5272 and #5343.Before / after
snapshoton an existing web session: base runs it on the host browser; head refuses withREMOTE_WEB_PUBLIC_NETWORK_UNENFORCEDbefore any handler.deviceswith a web session open: base and head list devices.snapshot: no observable change.Validation
Head e43a25e; CI pending.
pnpm vitest run packages/daemon/src/server/__tests__/request-router-web-sessions.test.ts: 30 passed. Removing the detached check fails 4 rows; removing the explicit-selector check fails 2; breaking the doctor field fails 1.Production delta versus 0.22: about +53 lines.
request-execution-scope.tsis 999 lines, under the 1000 cap.Residual risk: no platform-web launch guard.
publicNetworkOnlydoes not reach platform-web on 0.22.