Skip to content

Bucket fetch, publish, and transfer

Every time the node moves model weights in or out of your bucket it describes the move as one bucket operation: a snapshot ingest writing a file, a manifest being finalized, a verification reading a snapshot back, or a runtime pod copying its weights before the engine starts. One contract covers all of them, one transfer runtime routes each to a fetch or a publish, and one adapter per provider talks to the store. This page covers the operation contract, the four operation kinds, how the node authenticates to your bucket, large uploads, and the evidence.

One contract, two directions

flowchart TB
  subgraph CALLERS["WHO ASKS"]
    direction LR
    ING["Snapshot ingest"]
    VER["Verification"]
    INIT["weights-bucket-stage<br/>init container"]
  end
  OP[("model.bucket_operation.v1<br/>operation_kind, provider,<br/>locator, auth")]
  TR{{"Bucket transfer runtime<br/>routes by operation_kind"}}
  subgraph FETCH["FETCH"]
    direction TB
    DL["download_snapshot"]
  end
  subgraph PUB["PUBLISH"]
    direction TB
    UD["upload_snapshot_dir"]
    PS["put_stream"]
    FM["finalize_manifest"]
  end
  subgraph AD["PROVIDER ADAPTERS"]
    direction LR
    S3["s3"]
    MN["minio"]
    GCS["gcs"]
    AZ["azure_blob"]
  end
  BKT[("Your bucket")]
  ING --> OP
  VER --> OP
  INIT --> OP
  OP --> TR
  TR --> DL
  TR --> UD
  TR --> PS
  TR --> FM
  DL --> AD
  UD --> AD
  PS --> AD
  FM --> AD
  AD <==> BKT

Every caller hands over the same document, and the transfer runtime chooses the direction from its operation_kind. An operation with another contract version fails with MODEL_BUCKET_OPERATION_INVALID; an operation kind outside the four fails with MODEL_BUCKET_OPERATION_UNSUPPORTED.

The operation

model.bucket_operation.v1:

Field Holds
operation_kind download_snapshot, upload_snapshot_dir, put_stream or finalize_manifest
bucket_provider s3, gcs, azure_blob or minio
bucket_locator provider, uri, bucket, prefix, and endpoint_override for a private or S3-compatible endpoint
bucket_auth_mode ambient or secret_ref
bucket_auth_ref The credential for secret_ref
source_type, source_path Which model source the snapshot came from
manifest_key The manifest's key, _xratu_manifest.json by default
snapshot_digest The snapshot the operation belongs to

A bucket is required, and a provider outside the four fails with MODEL_BUCKET_FETCH_UNSUPPORTED or MODEL_BUCKET_PUBLISH_UNSUPPORTED.

Authenticating to your bucket

bucket_auth_mode The node reaches the bucket with
ambient Its own cloud workload identity: IRSA on AWS, Workload Identity on GCP, Azure workload identity
secret_ref The credential resolved for the model's source_bucket_auth slot from the serve assignment's lease

ambient is the default and needs no secret: the node's service account is granted access to your model bucket at install. secret_ref is for a bucket that identity cannot reach, such as a MinIO store or a bucket in another account; the credential is resolved like any other declared key and requires a bucket_auth_ref. See Infra identity runtime and Model-serving secret resolution.

The four operation kinds

Kind Direction Does
download_snapshot Fetch Downloads every object under the locator's prefix into a target directory
upload_snapshot_dir Publish Uploads a local directory under the prefix
put_stream Publish Uploads one object from a stream of known size, hashing as it goes
finalize_manifest Publish Writes the snapshot manifest at manifest_key

download_snapshot is how a snapshot leaves your bucket: verification reads a stored snapshot back into a temporary directory, and the weights-bucket-stage init container fills a runtime pod's emptyDir. A prefix with no objects fails; an empty snapshot is never staged.

put_stream is how snapshot ingest writes: each file from the model source streams through the node into its object without being written to disk.

finalize_manifest writes the manifest last, after every file is stored. The manifest's snapshot digest must equal the operation's; a manifest naming a different snapshot is refused with MODEL_BUCKET_PUBLISH_INVALID. The node serializes the manifest canonically, with sorted keys, and records its SHA-256 as the manifest_digest. A snapshot with no manifest is incomplete, so an ingest interrupted before this step is never mistaken for a finished one.

upload_snapshot_dir must upload at least one file and a non-zero number of bytes.

Large uploads

On s3 and minio, an object at or above the multipart threshold is uploaded in parts:

Setting Default Floor
Part size, stream_chunk_bytes 16 MiB 5 MiB
Multipart threshold, multipart_threshold_bytes 64 MiB The part size

The node resumes an interrupted multipart upload. It finds the upload already open for the object, lists the parts stored, uploads only the missing ones and completes it, and aborts any other stale upload for the same key. A multi-GB weights file interrupted by a node restart continues from its last stored part.

Publishing retries under model.bucket_publish_retry_policy.v1, one attempt by default, with backoff doubling from retry_initial_backoff_seconds up to retry_max_backoff_seconds. When every attempt fails the operation reports MODEL_BUCKET_PUBLISH_RETRY_EXHAUSTED with one of the snapshot ingest failure reasons: timeout, digest_mismatch, partial_upload or retry_exhausted. See Snapshot ingest runtimes.

The evidence

Each operation reports model.bucket_transfer_evidence.v1:

Field Holds
status staged for a fetch, uploaded for a publish
operation_kind, provider, bucket_locator What was moved and where
source_dir, target_dir The local side of the move
source_type, source_path The model source
manifest_key, manifest_digest The manifest, on finalize_manifest
uploaded_files, uploaded_bytes What a publish stored
Code Condition
MODEL_BUCKET_OPERATION_INVALID, MODEL_BUCKET_OPERATION_UNSUPPORTED The operation's version or kind
MODEL_BUCKET_FETCH_INVALID, MODEL_BUCKET_FETCH_UNSUPPORTED A fetch is malformed, unsupported, or found no objects
MODEL_BUCKET_PUBLISH_INVALID, MODEL_BUCKET_PUBLISH_UNSUPPORTED A publish is malformed or unsupported
MODEL_BUCKET_PUBLISH_RETRY_EXHAUSTED Every publish attempt failed