POST /v1/ingestions validates it and queues it in Redis. A worker claims it, pulls the brain
into scratch space, runs every item through the same propose → validate → commit loop the CLI runs, and — when the
brain changed — publishes the result as a new tag, ingest-<job_id>, on the same repository. The input tag is never
moved. GET /v1/ingestions/{job_id} says where the job is.
202 Accepted: the job is validated, not run. The body is checked against the project schema the way a
vitruvio.toml is, and the brain’s registry against the server’s allowlist, before anything is queued — so a
malformed request fails here with 400, not in a worker an hour later.
The job body
A document item is a file the worker fetches and registers, then hands to a proposer:
A candidates item is a proposal a model already wrote, which the worker only validates and commits:
task is the
object vitruvio task define returned, and candidates is the boltzmann.candidates/v1 document written against
it. Each item gets its own verdict; the job goes on after one fails.
Poll it
data.items[] fills in as the worker goes, one report per item: index, kind, ok, then data or error,
and changed. At the end data.result holds the whole account: input (repository, tag, digests,
authenticity), items, succeeded, failed, changed, warnings, status, and output — the result’s
repository, tag, digest and publish report when the brain changed, null when nothing was committed and
so nothing was published. Results live seven days; after that, and for an id that never existed, the answer is
404 NOT_FOUND.
Where the result goes
ingest run: canonical evidence is registered before the
derived candidates are validated, so a document item that failed validation can still report changed: true — its
evidence is in the published brain even though nothing was derived from it.
Limits
- A job body over
VITRUVIO_SERVER_MAX_JOB_BYTES(8 MiB) is413. - A document over
VITRUVIO_SERVER_MAX_DOCUMENT_BYTES(50 MiB) is refused; a lowerconfig.ingest.max_byteswins. https://downloads do not follow redirects and time out after sixty seconds.
Governed brains
A governed brain’s head must be signed to be accepted, so the job names the keys insign_with and the worker
signs the result before publishing it, then verifies from the registry before reporting the job done. The worker
needs an SSH agent holding those keys: mount the socket and set SSH_AUTH_SOCK, as
run it with Docker shows.
Documents from S3
s3://bucket/key is read with the worker’s AWS identity — the standard variables, an instance role, whatever
boto3 finds. VITRUVIO_SERVER_S3_ENDPOINT points it at an S3-compatible store.
How a job survives its worker
A worker holds a lease on each job it runs (two minutes, renewed every ten seconds). Every state write, the publication included, is conditioned on that lease inside one Redis transaction, so a worker that was paused, partitioned or killed and comes back late cannot overwrite the work of the worker that replaced it. A job idle longer than the lease is claimed by another worker and resumed from its recorded state: the request body stays in Redis until the job is terminal, and the exact manifest digest about to be published is recorded before the push. A worker that dies between pushing and reporting is therefore followed by one that checks the registry for that digest, finishes any signing the first one did not get to, verifies, and only then reportscompleted. When the
registry cannot be reached to decide, the job stays running rather than being reported failed.