Review by Claude Fable 5.1 (claude-fable-5-1) of fix/uploads-through-app at 04beeaa (one commit on origin/main ab97638), read in a review-only worktree. TMPDIR=/tmp make ci green: vet clean, every package ok (internal/slides 130 s, slidestest 113 s).
Verdict: APPROVED. The wrapper is correct, it cannot leak a presigner, and every codex 1/2 guarantee is unchanged (one is actually stronger). The cost the commit names, bytes through one instance, is real and bigger than the comment says on the way out; that is a follow-up, not a reason to keep uploads broken.
What I checked
Every presigner assertion, and whether the wrapper can be bypassed. grep finds exactly four store.(presigner) sites and no other interface assertion on the store anywhere: assets.go:329 (signUpload), :385 (putUpload's refusal), :797 (serveAsset), exports.go:756 (serveExport). throughApp struct{ blobs.Store } (assets.go:171) embeds the interface, so its method set is exactly Put/Get/Delete; all four assertions fail on it. No reflect import in internal/ or cmd/, no Unwrap, no inline interface{ Presign... } anywhere, and nothing in exports.go (dropObjects, the export Put at :559), thumbs.go (assetBytes) or editor.go (HasStore) asks the store for anything but the three methods. Nil handling is right: newBlobs tests s3 != nil on the concrete pointer before wrapping (main.go:165), so the typed-nil-in-interface trap the function's own comment warns about is not reintroduced, and ThroughApp(nil) returns a nil interface.
The guarantees. Unchanged line by line: the staging key is still minted by the app (newStagingKey), the receipt is resolved for this deck and actor before putUpload reads a byte (stagedUpload, :394), the body is under MaxBytesReader(maxAssetBytes) (:406), ObjectKey is the hash the store computed from bytes it read (:407, :431), registerAsset re-reads, sniffs, sanitises and promotes to sha256(final) (:575), the receipt is spent single-use (:611), and serveAsset checks the deck_assets row and the deck's own assets map (:766, :783). Through the app the "presigned PUT is unconditional" worry in §2.7 is moot: no browser is ever handed a bucket URL, so nothing can be overwritten in the bucket by anything but this app. putUpload's refusal on a presigning store is kept, which is the right thing: it preserves "one path", and a future un-wrapping cannot silently leave two.
The test. TestBucketThroughTheAppTakesTheInAppPath wraps a real presigning fake, runs the full sign, PUT, register, drive-API register_asset, GET flow, and asserts no mint, no redirect, bytes equal, and the object present in the store underneath. That is the property. The fake records both PresignPut and PresignGet calls, so a leak by either path would fail it.
Browser side. fixtures/editor-entry.js:191 sends the PUT with credentials: 'same-origin' for a relative URL and treats 204 as res.ok; csrf.Protect covers PUT and the editor sends same-origin evidence. This is the path development has always taken, so it is exercised by the existing browser tests too.
Timeouts on a slow upload. Nothing cuts it. The app sets no ReadTimeout/WriteTimeout and rastrillo's defaults are off (serve.go:236, only ReadHeaderTimeout 20 s and IdleTimeout 120 s). The edge's unixProxy has no ResponseHeaderTimeout; the backhaul transport's 30 s one counts from the request body being fully written, so it bounds only the app's own 20 MiB PUT to the bucket, not the browser's upload. The blobs.S3 client timeout is 60 s for the whole app-to-bucket exchange; in-datacenter that is fine for 20 MiB. See P3 below for the one odd case.
Caching on streamed pictures. private, max-age=31536000, immutable (:834) with X-Content-Type-Options: nosniff, the asset CSP and Content-Disposition: inline. Right for a content address that is the deck's capability: the browser keeps it for a year and never revalidates, intermediaries never store it. http.ServeContent over a bytes.Reader gives Content-Length and Range for free.
Findings
P2, memory on the way out: serveAsset buffers up to 20 MiB per uncached view, and the way in is roughly 2x what the comment says. assets.go:820 io.ReadAll of the whole object, held until ServeContent finishes writing. On the way in, blobs.S3.Put (rastrillo s3.go) does io.ReadAll and then strings.NewReader(string(body)), a second full copy, so one 20 MiB upload is ~40 MiB plus ReadAll's growth slack; registerAsset then does readAsset (20 MiB) plus the same Put again (~40 MiB) in one request. None of these have a concurrency bound. Failure scenario: a deck with eight 15 MiB photos opened from a share link by a handful of first-time readers (or one presenter surface plus the audience) is eight ReadAlls per reader at once, and a small instance OOMs, which drops every open editor stream on the box. Not a blocker today, because the previous state was no uploads at all and the alternative (CSP connect-src/img-src plus a bucket CORS rule) is a platform change; but it should be the next commit, and it is small: registerAsset has already sniffed and sanitised what the deck_assets row vouches for, so serveAsset only needs the kind. Read the first 1 KiB, sniffImage that, then io.Copy(w, io.MultiReader(bytes.NewReader(head), io.LimitReader(rc, maxAssetBytes))) with Content-Length from a HEAD or just chunked. Memory per view drops from 20 MiB to one buffer. The way-in copies are rastrillo's and would need S3.Put to hash once and send a bytes.Reader (no string conversion), or a staged file; worth an upstream note. The ThroughApp comment's "a 20 MiB picture once on the way in" should say "about three times that, across putUpload and registerAsset" so nobody sizes an instance off it.
P3, AGENTS.md still describes the presigned path as what runs. AGENTS.md:97 ("presigned PUT browser-to-bucket"), :304, :329 ("download route 302s to a presigned GET") and :644 (presignTTLFor caps). All still true of the code paths, none true of production any more. One sentence in the Assets bullet, "the platform's bucket is bound through slides.ThroughApp, so production takes the in-app PUT/stream paths; the presigned branches are live code but dormant until the CSP and bucket CORS admit the bucket's origin", stops the next session from re-deriving today's discovery. Spec §2.7 can stay as the design; AGENTS.md is the map of what runs.
P3, a bucket PUT slower than 30 s through the backhaul reports failure for an upload that landed. backhaulHeaderTimeout (edge.go:2827) is 30 s after the body is written; blobs.S3's own timeout is 60 s. If the app's PUT to the bucket takes between 30 and 60 s, the edge answers the browser 502 while putUpload goes on to succeed and record ObjectKey. The person sees "failed" and retries; the orphaned receipt expires in two hours and the content-addressed staged object is reused on the retry, so nothing is lost. Noted so the symptom is recognisable, not asking for a change.
P3, content-addressed staging shares objects between actors. Pre-existing on the Dir path, now production's: two people staging the same SVG within two hours get the same staged key; whoever registers first deletes the staged raw (:618, when sanitising changed the bytes), and the second registration gets 404 missing. Vanishingly rare, self-explaining (re-pick the file), and the delete could simply be skipped when another unconsumed receipt names the same object_key. Not for this branch.
Nothing in the branch touches the drive API, team mode, exports' holding logic or the guards; the diff is 77 lines and does what the commit says.