Streaming binary through the op registry: archives are copied three times
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.
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.