feat(artifact-cas): stream raw uploads to the OCI CAS backend

Closed
JA
1mo ago
+599-43

The OCI CAS backend buffered the entire artifact in memory before pushing it to the registry, so CAS memory usage scaled with artifact size. This adds a streaming upload path for the OCI backend that pushes the raw layer directly from the client stream, keeping CAS memory bounded regardless of artifact size.

A custom v1.Layer streams the content to the registry with the known digest and size, detects the media type from a bounded peek, and verifies the content digest as the bytes stream. The artifact size is derived from the upload reader and propagated to the backend so the layer can be built without buffering; uploads whose size is not known fall back to the existing buffered path. The download path is unchanged.


AI assistance: this contribution was produced with the assistance of Claude Code.