Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
Affected plugins
|
This comment has been minimized.
This comment has been minimized.
9de4969 to
645614d
Compare
645614d to
617342e
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on 905de55. The verdict and the full list are in the summary comment.
|
At 905de55, a large but valid app bundle that installs on the base branch can no longer be uploaded, and there are further problems in upload cleanup, admission and error handling. During extraction, a reservation holds the payload bytes plus the expanded bytes (resumable path, legacy path). The per-tenant budget is 4 GiB, but the per-artifact limits allow 2 GiB compressed and 4 GiB expanded. For example, a 1.2 GB tgz that expands to 3.5 GB finalizes on the base branch. Here it fails at finalize, even on an empty tenant, with a retriable 503 that can never succeed. The legacy route can also re-upload up to 2 GiB before it fails again. Any single upload that the per-artifact limits accept must fit in an empty tenant budget. Please derive the per-tenant budget from the compressed and expanded limits in host-kit, keep the daemon-wide budget at least as large, and add a test that charges both maximums on an empty tenant. A second independent pass found that resumable cleanup returns capacity while files are still staged. Ticket expiry, terminal finalize failure and rollback invalidation release the reservation before the writer stops or the directory is removed. New uploads can spend those bytes too early, and a failed removal leaves files uncharged. A ticket can be invalidated at once, but every cleanup path must keep the reservation until the writer has finished and removal has succeeded, and must retry a failed removal. A second independent pass found that a failed directory removal loses ownership of the reservation. Retained-upload expiry and install cleanup delete the only entry that holds the release callback, so the capacity stays charged with no retry. Resumable initialization and refused publication have the same problem, while a failed legacy body or publication frees the charge even if files remain. For every provisional, unpublished or retained upload, one record must own both the directory and the reservation until removal succeeds. A second independent pass found that a materialization cleanup error skips uploaded-source cleanup. If removal of the IPA extraction directory rejects, the original upload is never cleaned up. Its expiry timer is already cleared, so its files and reservation remain until shutdown. Uploaded-source cleanup must run even when materialized cleanup rejects, for example from an inner A second independent pass found that legacy admission refuses known-length uploads that fit. It demands 2 GiB before it reads the request. A 1 MiB upload gets a 503 when less than 2 GiB is left in the tenant or daemon budget, although the base branch accepts it. A body with a valid A second independent pass found that the client replaces a tenant header supplied by a direct-upload ticket. A proxy that issues a canonical tenant in A second independent pass found that the client drops typed capacity refusals on finalize and on legacy upload. A finalize 503 with Not blocking: these can be taken or left: compare the reason through Coverage and Repo Guards fail in the wire compatibility tests, and the failures are likely related to this change: it alters the declared upload client requests with the tenant header and the 503 body parsing. The artifact consumer mutation failure comes from #5278 on the base branch, which fails the same gate. One other check was still in progress. Not verified here: no tests were run, CI failures were read only from the failure summary, it was not traced whether a proxy forwards or overwrites the tenant header on the upload routes, and it is unknown how many real app bundles exceed 4 GiB combined. Before merge, a single valid upload accepted on the base branch must fit the byte budgets again, and the other problems above need fixes. The pending ADR 0006 wire compatibility ledger decision for the new tenant headers also needs to be resolved. |
905de55 to
15b8b10
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 15b8b10. The verdict and the full list are in the summary comment.
2868af0 to
28b27fa
Compare
28b27fa to
49ec620
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
At f97e504, the direct client now sends The tenant budget problem is still open. upload-capacity.ts:7 keeps The size fix likely does not work through the remote proxy. daemon-proxy.ts:141 does not forward On the same path, a second independent pass found a concrete case: a tenant with 3 GiB retained sends a valid 1 MiB legacy upload with For a follow-up issue, not for this PR:
These threads no longer apply and can be resolved:
Repo Guards fails the ADR 0006 daemon RPC wire-compatibility check, likely because of this PR. The changed declarations include Not verified here: no tests were run. The cause of the Coverage failure is unknown, because the captured log ends before any failing test. Chunked forwarding by Before merge, the tenant budget and proxy upload cases need fixes with the tests above, and Repo Guards needs to pass. |
f97e504 to
8f48d74
Compare
8f48d74 to
48b785f
Compare
|
At 48b785f, valid uploads can still be refused for capacity, and the wire compatibility check fails. Since the earlier review, both retry guards now compare the typed capacity reason. The tenant byte cap, legacy upload admission, the typed legacy refusal and the wire ledger still need work. The tenant cap is too small (upload-capacity.ts:7, unchanged since f97e504). Legacy upload reserves 2 GiB for small files again. The rebase dropped f97e504, so A second independent pass found the same cap problem on resumable finalize (resumable-upload.ts:402). A 1.2 GiB app-bundle archive expanding to 3.5 GiB passes preflight and PUT on an empty daemon, then gets the retriable 503 (upload-capacity.ts:58, upload-client.ts:410). A fresh ticket cannot help. The per-tenant cap must cover the shared compressed and expanded maxima, and the daemon cap must still admit a second tenant's maximum upload beside the first. A second independent pass found that A second independent pass found the direct legacy case (upload-client.ts:282): with 1 GiB free, a 1 MiB fallback upload is sent chunked, so the daemon reserves 2 GiB and refuses it before reading the file. A known-size body should be charged its actual size, for example by sending A second independent pass found the proxy case (daemon-proxy.ts:744): the forwarded headers omit a valid A second independent pass found that the typed legacy refusal is lost (upload-client.ts:308). A temporary capacity 503 becomes A second independent pass found that the wire ledger is stale (ledger.json:183). Upload producers and consumers listed in surface.ts:168 and surface.ts:466 changed, but the digests and old acknowledgments (ledger.json:491, ledger.json:561, ledger.json:606) did not. Please record current digests, update the manifest where closure requires it, and give each compatible change a specific ADR 0006 rationale. If an existing peer cannot interoperate safely, the ADR's protocol version decision and matching ledger update apply. Not blocking: since Four lower-priority threads still apply. Two other threads do not and can be resolved: retry reason guards is fixed at this commit, and truncated tar charge is benign because manifest validation fails a truncated archive before the charge (release-before-removal remains a follow-up). Repo Guards fails on Not verified here: no tests were run, and the findings come from reading the code and the changes since f97e504. It is also not known whether dropping f97e504 was intentional (the description still describes its behavior), what caused the Coverage failure, or how the built-in proxy forwards chunked bodies in a live run. Before merge, the tenant cap must fit one maximum upload, legacy admission must charge only written bytes on every hop, the typed legacy refusal must return, and the ADR 0006 ledger must be updated so Repo Guards passes. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a4c3cf8 to
78e1a50
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
At ad64964, the first cleanup failure is observable and each closed ticket has one retry chain; surviving bytes remain charged while removal fails. The earlier review at 79b1c86 found no issues, and this follow-up finds no new code issues. The cleanup retry thread no longer applies because the failure is observable and retries share one chain: #5281 (comment). Both cancelled jobs are Body rules, which evaluate the pull request title and body; the code delta does not change the workflow or its rules. Not verified here: the cancellation cause and a passing gate result were not established because no cancellation log was provided. No conflicts are known. Before merge, confirm a completed Body rules result at the reviewed commit if the gate is required. Not verified here: tests, mutation checks, and a live daemon run were not performed; the test failure before the fix and the log event runtime wiring were traced statically. The previously reported Android proxy-lease install remains applicable because this delta does not change device dispatch or native execution. |
1c403c8 to
e3ba3f5
Compare
This comment has been minimized.
This comment has been minimized.
|
The code review of e3ba3f5 found no remaining code issues. Since the earlier review, cleanup retries retain capacity until removal succeeds, and expiry and rollback share one removal owner. No conflicts are known. The cleanup retry thread no longer applies: the retry preserves capacity until the directory is removed. All five checks were cancelled; the cancellation cause and affected Smoke Tests platform and phase are not identified. Prose covers the changed documentation, Bundle Size compares the changed packages, Smoke Tests shares daemon startup and dispatch with this change, and both Body rules entries check the updated title and body. Confirm completed required Prose, Smoke Tests, both Body rules entries if required, and Bundle Size checks for e3ba3f5 before merge. Not verified here: local tests, CI reruns, or device actions were performed. Historical test counts and the Android run lack raw receipts. The earlier Android proxy-lease install receipt is attributed to c125cd3; the upload commits add no changed device-facing route since ad64964. The pre-start recording guard and durable owner normalization are already in #5278, whose live validation remains pending. |
e3ba3f5 to
0cd48fb
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 0cd48fb. The verdict and the full list are in the summary comment.
- 🟡 Minor · Declared Content-Length is trusted: a lying length charges one byte for a 2 GiB body ·
packages/daemon/src/server/upload.ts:58
|
The follow-up at 0cd48fb removes expired owner records after the same deadline enforced by historical reads; the earlier cleanup disposition was rechecked in source. The code review found no outstanding issues, and no conflicts are known. The request reservation thread no longer applies: the standard Node listener supplies a fixed-length parsed request, so its body is covered by the declared-length reservation. The initial Apple Smoke Tests aggregate failed after a prerequisite was cancelled. The latest GitHub check snapshot for 0cd48fb reports 19 passed, with no pending or failed checks. Not verified here: tests, gates, CI reruns, or device actions were not performed. The previously accepted Android proxy-lease install evidence is attributed to c125cd3; no raw transcript or current-head device run was supplied. The separate #5278 live-evidence gaps are recorded in its issue artifact. The code review is complete for 0cd48fb. |
0cd48fb to
20313d1
Compare
This comment has been minimized.
This comment has been minimized.
|
@apex-sentinel-staging review |
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 one staging budget for legacy uploads, resumable uploads, and retained artifacts. Keep each reservation charged until its staging directory is removed. The first ticket close owns removal and the daemon logs the first deferred cleanup. Stacked on #5278.
Before / after
UPLOAD_CAPACITY_EXCEEDEDand retriable classification.Validation
At
0cd48fbd30, all five upload patches matche3ba3f57bcby range-diff after rebasing onto #5278fe6452bc3f. Hosted checks are running. Ate3ba3f57bc, all 19 hosted checks passed.At
ad64964df7, 19 hosted checks completed without failures. All 23 tests inpackages/daemon/src/server/__tests__/resumable-upload.test.tspassed. The mocked rollback failure exercises an initial removal and a scheduled retry. At024f263a10, 51 wire and mutation tests passed after the upload header types and control-request mutation were updated. The emitted headers and protocol 4 are unchanged by that update.At
c125cd3375, an Android emulator installed an 87 MB APK through a remote proxy lease. This receipt predates the current stack.20313d1e5apassed merge-tree. CI pending.