Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
Affected plugins
|
There was a problem hiding this comment.
All reported issues were addressed across 27 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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
At c4f9376, this change needs fixes before merge. The main problem is that remote install appears to fail after a successful upload when the daemon or proxy has no auth hook. Does a caller that declares a tenant now lose access to its own upload? tenant-owned-entry.ts:38 requires an exact tenant match, and session-app-deployment.ts:80 and install-source-resolution.ts:51 read with the RPC tenant. Upload routes take the tenant from the hook or the The RPC budget has 32 global slots. A slot is taken when headers arrive, before authentication, and is held through command dispatch (http-server.ts:313). The daemon body read has no short deadline of its own (about 665 s), and the proxy reads the full body before it checks authorization. So 32 slow unauthenticated requests to a tunnelled proxy can make every authenticated caller get 503. On a shared host, 32 long commands can also refuse the next caller from any tenant, as the budget test partly shows. The base serves these callers. The rule: the budget bounds bytes buffered before admission, and no caller holds a count slot past authentication or a short pre-auth deadline. This applies to every RPC entrypoint in the daemon and the proxy; the byte reservation can stay through dispatch if the body needs it. Please update Can staged uploads exceed the documented limits? The only capacity check is in resumable preflight (resumable-upload.ts:116). Legacy Does Live validation is required before merge, because this changes remote app install and the PR reports no live remote or device run. After the upload fix, run A second independent pass found the same upload ownership gap on same-origin chunk requests (daemon-artifacts.ts:199, upload-client.ts:419), and it also affects A second independent pass found that, on a daemon with no auth hook, a caller with no admitted tenant can name an existing leased session and inherit its tenant, run, lease and provider (lease-context.ts:85, lease.ts:106). The lease-exempt A second independent pass found that a tenant can still list, download and remove retained screenshots and recordings after its lease ends (artifact-tracking.ts:438), because entries carry no lease ID. Should each entry record its producing lease, and should inventory and download check it? This conflicts with ADR 0024, which keeps teardown recordings, so an active-lease-only requirement needs that conflict settled explicitly. A second independent pass found that a tenant with a new lease can consume an upload from an ended lease through A second independent pass found that a provider-session ID lookup skips active-lease admission after release (lease.ts:570), and a test expects that. It matches the documented past-session lookup. If only active owners may read artifacts, should this path check the resolved lease too, or should the docs and requirement state the exception? A second independent pass found that Limrun's settled HAR lookup after release is now refused before it reaches the runtime (lease.ts:571, runtime.ts:706). The HAR can hold captured credentials. Should the owner get it in the close or release result, or should the retained owner record be an explicit exception? A second independent pass found that legacy A second independent pass found that unauthenticated or still-authenticating daemon requests can fill the RPC pool, including a complete body waiting on a stalled auth hook (http-server.ts:324). Can header credentials be checked before the shared pool is charged, with body-token and hook authentication under their own short deadlines and limits? A second independent pass found the same problem in the proxy: the body read only follows the request abort signal, and external authentication can hold a slot while the client stays connected (daemon-proxy.ts:209). Can one short ingress deadline cover both the body read and the hooks? A second independent pass found that an over-limit proxy read awaits A second independent pass found that the Node proxy can drop the connection instead of returning the capacity 503: cancelling the adapted body destroys the unfinished request before the response is written (rpc-body-budget.ts:31). Can the Node adapter write the refusal first, with independent cancellation kept for the Fetch entrypoint? A second independent pass found that direct tenant HTTP through a tunnel or gateway, with no auth hook and no network-access marker, passes without A second independent pass found that replay source bundles with empty names and texts add nothing to either budget (script-source.ts:31), so many of them still reach suite discovery. Can empty names be rejected, and each bundle carry a minimum cost or the bundle count be capped? Not blocking: these can be taken or left: make the web refusal help and Could a smaller design cover this: the tenant header on every upload route instead of a daemon special case; one aggregate RPC byte budget with a short pre-auth deadline and the count slot released at authentication or removed, mirrored in the proxy; one staged-byte budget in upload admission; lease-ID reads through the registry's existing post-release ownership record; and the web refusal and replay bound as a separate small PR? The package grows by 4.1 kB. Only the post-close artifacts behavior needs a maintainer decision first. The dispatch slot thread still applies. These threads no longer apply and can be resolved: this one, as the hook now follows the request abort signal; this one, as the body read now cancels on abort and releases; this one, as lease admission no longer depends on a tenant being present; this one, as the capacity error now maps to 503; and this one, as the 22 of 23 checks pass, including the unit and repo guard jobs that cover the changed daemon, proxy and replay code. The Body rules check was cancelled, not failed; it checks the PR description, and the cancellation looks unrelated to this diff, likely replaced by a newer run. Not verified here: no tests or live runs were done, and the upload and post-close failures were traced in code but not reproduced. The upload case assumes no auth hook and no proxy Before merge, make upload and install resolve one tenant, with an HTTP upload-then-install test and the live remote install. Then release the RPC count slot at authentication with a pre-auth deadline, put every upload route under one staged-byte budget, and restore or re-document post-close |
|
Upload findings from this review are addressed in stacked draft PRs #5278 and #5281:
The focused tests pass at #5281 head |
|
Ingress findings from the review at c4f9376 are addressed in draft #5282, stacked on the upload fix #5281 (head
The upload, lease, and replay findings are handled in their separate stacked PRs; #5282 contains only the ingress and provenance changes. |
|
Replay source admission follow-up: draft #5277 rejects empty entry and file names and caps raw requests at 256 bundles and 2,048 files before suite discovery. The focused source test passes 6/6; #5277 checks are green. This addresses the zero-cost empty-source concern in the review. It remains stacked on #5243 and is not merged. |
This comment has been minimized.
This comment has been minimized.
|
At c41ac49, this change still needs fixes before merge. The earlier replay source budget gap is fixed: empty names are now rejected, and restricted requests are capped at 256 bundles and 2,048 files. The upload tenant, RPC slot, post-close artifact and live-run items remain. Remote install still appears to fail after a successful upload when there is no auth hook ( The global limit of 32 RPC slots is still charged before authentication and held through dispatch, and the proxy still reads the full body before authenticating. So 32 slow unauthenticated bodies, or 32 long authenticated commands, make the next authenticated caller get 503 on a shared or tunnelled host, where the base serves that caller. The rule: no caller may hold shared count capacity needed by others, and bytes and time spent before authentication must be bounded, on every RPC entrypoint in the daemon and the proxy. Draft #5282 needs to land here, removing the count gate and adding those bounds. A lease-ID artifacts read still requires an active lease, but A live run is required before merge, because this changes remote app install admission and no live run is reported. After the upload fix lands in this branch, run Also, a second independent pass found that the client now infers the restricted policy from the URL and refuses before RPC. For example, behind a private HTTPS gateway that forwards RPC to a token-only daemon without the public-network marker, the daemon does not apply the restricted policy, and the base accepts a suite of 257 small Not blocking: these can be taken or left: align the CLI help ("public-network remote daemon") with the docs ("non-local remote daemon") to match whichever daemons enforce the counts, and share the limit constants and assert helpers between script-source.ts and For a follow-up issue, not for this PR: land the shared staging reservation from draft #5281, since only resumable preflight checks capacity; and land the related parts of draft #5282 for the proxy refusal path and direct tenant HTTP policy. The dispatch slot hold thread still applies. All 23 checks pass at this commit. Not verified here: no tests or live runs were executed, and the carried-over failures were confirmed by reading the code, not reproduced. The fixes in drafts #5278, #5281 and #5282 were not reviewed and are not part of this commit. No maintainer decision was found in the PR comments on post-close artifact reads or on the ADR 0024 teardown recording conflict. Before merge, remote install must succeed after upload for |
|
Addressed the URL-based replay count refusal at |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
At head |
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 48c1a55. The verdict and the full list are in the summary comment.
|
Disposition for the review at
GitHub reports 24 passing checks at |
|
The review of 48c1a55 has findings. The Node listener now returns the proxy capacity refusal, and the managed browser ref-fill path has patch-equivalent live readback in #5273. The earlier upload, admission and post-close artifact findings remain open. A tenant-scoped install through a hookless daemon or proxy uploads an ownerless artifact, then fails with UNAUTHORIZED before reaching the platform. Could the normalized tenant from the consuming request be sent by both preparation paths on every daemon-origin upload request, while preserving attested ownership and ticket-only headers for external chunks? The fix in #5281 is not in this branch. Upload preparation On /rpc and /rpc/checked, the daemon reserves shared capacity before authentication and holds it through dispatch. Slow bodies, connected authentication hooks or admitted commands can fill all 32 slots and cause later legitimate calls to receive 503 RPC_BODY_CAPACITY_EXCEEDED. Bound pre-auth bytes and time with an RPC-specific deadline, and release the pre-auth charge at admission before dispatch. RPC admission Closing a cloud session removes its active lease before the documented lease-ID artifacts request can reach its provider, even when the provider retains the capture. Admit owner-scoped artifact reads using retained tenant, run and provider ownership for the retention window while keeping work admission active-only, or document another supported post-close route that preserves lease-keyed captures. Artifact admission The Android APK receipt belongs to #5281, which contains the missing upload fix, so it does not demonstrate this head's hookless upload-to-install route. Before merge, record the resulting SHA, device and output for a hookless proxy or tunneled token-only daemon with explicit --tenant or a scoped lease, showing upload completion, real install success and installed package verification. Install preparation The proxy also reserves shared RPC capacity before authentication and holds it through the upstream response. Stalled bodies or connected hooks and admitted upstream work can exhaust the 32 slots and return 503 PROXY_RPC_BODY_CAPACITY_EXCEEDED to later valid callers. Apply bounded pre-auth bytes and deadlines in the shared handler, and release the reservation before forwarding. Proxy budget The managed web backend pin changes to 0.42.0, so a host provisioned with 0.39.0 can fail with TOOL_MISSING after upgrading agent-device. Document rerunning agent-device web setup in the same state directory for existing installations, including CI and MCP hosts. Web setup A second independent pass found that the exact tenant ownership check rejects the ownerless upload from a tenant-scoped install without an auth hook. Could the tenant-header change from #5281 be included here for legacy upload, preflight and retry, same-origin chunks and finalize, with an upload-then-install HTTP test through the production router? Keep external chunks ticket-only and retain the exact ownership check. Tenant ownership A second independent pass found that both listeners still charge the shared RPC count before authentication and hold it through dispatch or the upstream response. Could #5282's finite body and authentication deadlines and dispatch-independent admission accounting be included here? Daemon admission A second independent pass found that the documented artifacts command still cannot read a released cloud lease by ID. Could the owner-scoped retention route be restored, or the help and guide changed to a supported provider-session route, with a test that releases a lease and reads its artifacts? Lease admission The upload tenant thread still applies despite its resolution; zero lower-priority threads still apply. The fill separator thread does not apply because the pinned parser preserves the value and #5273 confirms the separator case. Body rules was cancelled; its cancellation cause is unverified, and its title and body checks appear unrelated to the patch. No conflicts are known. Before merge, land upload scope propagation, finite pre-auth deadlines and dispatch-independent accounting in both listeners, restore an owner-scoped post-close artifact route, document web reprovisioning, record the live install evidence and confirm Body rules. Not verified here: local gates, tests and device runs were not performed; primary run output for the reported 166 tests and typecheck was not provided. The browser receipt does not verify network confinement or an in-place upgrade from 0.39.0. |
|
The managed browser upgrade item in the review of |
This comment has been minimized.
This comment has been minimized.
|
The review of 5d785de still finds regressions from the earlier review. The documentation delta addresses the command guidance, but the tenant upload, RPC admission, and post-close artifact issues remain. The 25 hosted checks are green, and the previously cancelled Body rules check has no failing head job to attribute. There are no conflicts. A tenant-scoped install through a token-only daemon or proxy without an auth hook can upload successfully and then fail with UNAUTHORIZED before platform dispatch. Both preparation paths must carry the consuming request’s normalized tenant through legacy upload, preflight and retry, same-origin chunks, and finalize; retain the exact ownership check, attested scope, and separate ticket headers on external storage PUTs. Upload preparation Daemon RPC calls can receive 503 RPC_BODY_CAPACITY_EXCEEDED before authorization when admitted commands hold the listener-wide slots. Both RPC routes must bound body receipt and authorization with a dedicated deadline and release the preauthorization slot at admission, while retaining the buffered-byte limit. Daemon ingress After a releasable cloud session closes, the documented lease-ID artifacts lookup can reject its owner before reaching a provider that retains the captures. Artifact reads must use retained tenant, provider, and supplied run ownership during the retention window while work admission stays active-only, or a supported post-close path must preserve lease-keyed captures and be documented and verified. Artifact admission The Android emulator receipt belongs to #5281, and the #5278 HTTP fixture uses a test dispatcher. Before merge, the candidate with the tenant fix must have a live receipt that records its SHA and device and shows upload completion, platform install success, and installed package verification through a hookless proxy or tunneled token-only daemon with an explicit tenant or equivalent scoped lease. Deployment Proxy RPC calls can receive 503 PROXY_RPC_BODY_CAPACITY_EXCEEDED before authentication when admitted upstream requests hold the shared slots. The shared handler used by both entry points must bound preauthorization and release its slot before forwarding, with buffer accounting tied to retained bytes. Proxy budget A second independent pass found that the unchanged strict ownership check can reject the caller’s ownerless upload on a hookless tenant-scoped install. Could both upload call sites derive the normalized lease scope and propagate it through every same-origin upload phase while keeping external chunks ticket-only, or could #5243 and #5281 be landed together? Ownership check A second independent pass found that 32 admitted long-running daemon commands or stalled bodies can exhaust the unchanged preauthorization slots and reject a valid caller. Could the count end at admission and use an RPC-specific deadline, or could #5243 and #5282 be landed together? Daemon ingress A second independent pass found that 32 long upstream requests, stalled bodies, or connected hooks can exhaust the unchanged proxy slots and reject a valid caller. Could the shared handler release the reservation before forwarding and bound preauthorization, or could #5243 and #5282 be landed together? Proxy budget A second independent pass found that the unchanged active-lease check rejects the documented lease-ID artifacts route after session close. Could retained ownership admit artifact reads while work remains active-only, or could a supported post-close route be documented and verified, or #5243 and #5278 be landed together? Artifact admission The upload scope thread still applies despite its resolution; zero lower-priority threads still apply. The fill thread was withdrawn because the pinned parser preserves the value and the prior receipt covers the same provider and tool code. Not verified here: local gates, tests, and device runs were not performed; the original scan report and primary output for the reported 166 tests and typecheck were not supplied. The browser ref-fill receipt carries forward with a matching production-file diff; an in-place managed browser 0.39.0 upgrade was verified by source trace only. Before merge, the candidate needs matching upload scope, dispatch-independent daemon and proxy preauthorization, owner-scoped post-close artifact access, and the live hookless install receipt. |
|
For the hookless native install request, the delegated iOS 26.2 run on isolated This covers the requested hookless iOS install on the combined candidate that includes the tenant fix from #5281. The standalone #5243 head had no live install run. The post-close artifact and RPC ingress evidence requests remain open. |
|
The maintainer’s three behavior requirements belong in one release candidate. #5281 preserves upload tenant scope through every same-origin phase, #5282 bounds daemon and proxy preauthorization separately from execution, and #5278 admits post-close reads under the retained producing scope while work remains active-lease only. The existing hookless iOS 26.2 receipt covers explicit-tenant package and local ZIP staging/install and materialized-path release at combined tip The live #5281 branch at |
* fix(replay): bound source bundle and file counts * fix: let empty replay source lists reach suite discovery * fix: preflight remote replay source counts on client * chore: format replay source preflight * fix(replay): enforce remote source limits in nested batch steps * fix(replay): type structured batch regression fixture * fix: preserve batch step error details
* docs(security): design remote web network confinement * docs(security): phase remote web confinement * docs(security): correct Chromium proxy bypass * docs(security): require isolated confined browser sessions * docs(security): bind remote web confinement to session state * docs(security): cover DNS64 in remote web confinement design * fix(web): carry remote network policy into browser provider * fix(web): own confined browser refusal at launch * fix(web): refuse confined commands before provider cleanup * refactor(web): keep confinement admission before browser effects * docs(web): scope remote refusal to tenant ingress * fix(web): prove confined default provider composition
* fix(web): classify public network destinations before proxy connect * fix(web): admit only allocated IPv6 destination ranges * refactor(web): separate destination admission decisions
* fix(providers): bound credential endpoints and responses * fix(providers): require origin fences for authenticated downloads * fix(providers): bound Limrun control responses * fix(providers): satisfy response boundary gates * fix(providers): share response failure vocabulary * fix(providers): cancel stalled Limrun response reads * docs: regenerate provider response reasons * chore(gates): refresh contracts export snapshot * test(providers): narrow stalled response observation * fix(providers): preserve observed Limrun rejection status * test(providers): await client-observed rejection body * test(providers): observe retry conflict body seam * fix(providers): keep response reason in existing closure * fix: preserve anonymous Limrun release redirects and BOM decoding * fix(providers): close credential and response boundaries * fix(contracts): keep response reasons in remote facade * docs(contracts): summarize provider response reason * fix(providers): narrow response bounds to buffered bodies * fix(revyl): report oversized responses with shared reason
* chore: update managed browser for session security fixes * fix: preserve literal double dash in web ref fill * test(web): expect batch fill separator * test(web): decode batch stdin from supported buffer input * chore(web): format batch fill expectation
5d785de to
61f0e4d
Compare
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/daemon/src/server/resumable-upload.ts:132 |
🆕 Upload capacity refusal says "Too many uploads" when the byte budget is exceeded |
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 61f0e4d. The verdict and the full list are in the summary comment.
- 🟡 Minor · Upload capacity refusal says "Too many uploads" when the byte budget is exceeded ·
packages/daemon/src/server/resumable-upload.ts:132
| function assertResumableUploadCapacity(options: BeginResumableUploadOptions): void { | ||
| let tenantCount = 0; | ||
| let tenantBytes = 0; | ||
| let totalBytes = 0; | ||
| for (const entry of RESUMABLE_UPLOADS_BY_ID().values()) { | ||
| totalBytes += entry.sizeBytes; | ||
| if (entry.tenantId === options.tenantId) { | ||
| tenantCount += 1; | ||
| tenantBytes += entry.sizeBytes; | ||
| } | ||
| } | ||
| if ( | ||
| tenantCount < MAX_ACTIVE_UPLOADS_PER_TENANT && | ||
| RESUMABLE_UPLOADS_BY_ID().size < MAX_ACTIVE_UPLOADS_TOTAL && | ||
| tenantBytes + options.sizeBytes <= MAX_RESERVED_UPLOAD_BYTES_PER_TENANT && | ||
| totalBytes + options.sizeBytes <= MAX_RESERVED_UPLOAD_BYTES_TOTAL | ||
| ) { | ||
| return; | ||
| } | ||
| throw new AppError('COMMAND_FAILED', 'Too many active resumable uploads', { | ||
| reason: UPLOAD_FINALIZE_REASONS.capacityExceeded.reason, | ||
| retriable: true, | ||
| }); | ||
| } |
There was a problem hiding this comment.
🆕 🟡 Minor · Upload capacity refusal says "Too many uploads" when the byte budget is exceeded
A single 5 GiB file on an idle daemon is refused with Too many active resumable uploads even though the byte budget (4 GiB per tenant, 16 GiB total) was the limit crossed. UPLOAD_CAPACITY_EXCEEDED carries no details field, so a caller cannot tell a count refusal it should shard around from a size refusal it must shrink the file for.
Suggested change
Name the exceeded limit and the observed/limit values in the UPLOAD_CAPACITY_EXCEEDED details (uploadCount/sizeBytes/limit), so a client can tell a count refusal from a reserved-bytes refusal.
Details
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
Enforce tenant ownership for cloud and local artifacts, cap in-flight uploads and RPC bodies, and stop waiting on HTTP auth hooks after disconnect. Bound replay sources at daemon admission. This addresses daemon and proxy findings in Daybreak scan
wfr_62518a30795e3d4866f99342f762ecbde8dd57570bf78ea1c80892aea2c7f6d8.Before / after
Validation
At
48c1a552ea, GitHub reports 24 passing checks. The recorded local run passed 166 focused proxy and daemon ingress tests and typechecking. The Node adapter preserves the typed response when the handler cancels an unread body.Post-close artifact ownership is covered in #5278. Client tenant propagation across upload phases and the shared staging budget are in #5281. The hookless HTTP fixture covers upload and consumption with a declared tenant. Hookless native install evidence is pending. #5282 owns the five-second RPC preauthorization deadline and slot lifecycle and is stacked on #5281.
At
5d785de57c, the command reference explains how to rerun web setup after upgrading from managed browser 0.39.0. The commit only changes documentation, so runtime tests do not apply. Hosted checks are pending.61f0e4de9apassed merge-tree. CI pending.