Artifacts Associated With Ticket 6dbaeb218dcf545420cc76c79f61221f1ed72085
Ticket change [374c34d1d0] (rid 815) by dmestas on 2026-08-18 14:41:30:
- comment initialized to:
An archive request today reads the built file into memory, base64-encodes it into a JSON op result, and the web route decodes it back — three full copies of a 13MB payload plus a 17MB string, per request. The disk cache removed the rebuild cost (10.4s cold, 0.7s warm for sqlite trunk) but that residual 0.7s is entirely the copying. The tension is 0001 §9: one registry serves HTML and JSON, so the web route cannot bypass the op. But ops return JSON values and an archive is bytes, which JSON has no type for. Worth deciding: whether the registry grows a notion of a streaming/binary result (an op that yields an io.Reader plus content type, with the JSON surface returning a download URL rather than the bytes), or whether binary downloads are declared outside the op seam with their own rule. The former keeps §9 intact; the latter is smaller but carves an exception. Also here: a 304 revalidation still runs the whole op before the ETag is compared, because the ETag contains the resolved check-in and resolution lives in the op. Cheap to fix once a resolution is available without building the archive.
- severity initialized to: "Minor"
- status initialized to: "Open"
- title initialized to:
Streaming binary through the op registry: archives are copied three times
- type initialized to: "Code_Defect"
- comment initialized to:
Ticket change [5a8e0862e7] (rid 849) by dmestas on 2026-08-18 18:39:59:
- Untracked field cmimetype: "text/x-markdown"
Ticket change [71450c2e2e] (rid 1083) by dmestas on 2026-08-19 11:04:38:
- priority changed to: "Medium"
- type changed to: "Code_Defect"
Ticket change [af34048376] (rid 1133) by dmestas on 2026-08-19 12:10:54:
- subsystem changed to: "api"
Ticket change [532d1de2f2] (rid 11458) by zeitgeist on 2026-09-22 23:19:00:
- icomment:
Closed on measurement, build 862080ecb8f7 (landing `5d43bd81`, dmestas chose the registry-grows-a-file-result shape): GET /api/v1/r/dantest-sandbox/archive/trunk?format=zip 200 Content-Type: application/zip Content-Length: 503737 ETag: "34267e69fcf6265306ff70f06de5abf967050bcc9175bea0fc9dd4751ee89acc-zip" body starts PK — the archive itself, 62 entries; no JSON envelope, no base64 same, If-None-Match: "34267e69fcf6265306ff70f06de5abf967050bcc9175bea0fc9dd4751ee89acc-zip" 304, empty body, 0.26s — answered before any build web route /r/jva/dantest-sandbox/archive/trunk with the same ETag -> 304 a version that does not exist -> 404 with a JSON body `ops.File`: an op may answer bytes; the router serves them with content type, disposition, length and ETag; the web route hands the same value to the same writer. `archive.get` names the bytes and builds them in Open, after the 304 check; the bytes are copied to the socket once. A contract change for API clients of this one op, which is what a0770478 asked for. - mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [b9f3b67c1b] (rid 12453) by zeitgeist on 2026-09-24 00:52:47:
- Untracked field number: "18"