Specifications

The BuildWarden ledger format, versioned and long-lived (RELAY-05). The relay is a reference implementation of these documents; a third-party reader or writer needs nothing else.

The driver contract, how an orchestrator such as warden runs a driver binary, is specified here too, in driver-contract/, until it moves to the specifications repository with its conformance suite.

The specifications of BuildWarden's other component seams (the claim, the collector, the relay's guest API, the executor's initialize and the bootstrap config) are kept in their own repository; the Component seams page lists them, with the version of each this repository implements.

Layout

specs/
  README.md                      this index
  build-ledger/v<N>.md           ledger wire format, one per major version (prose only)
  metadata-<name>/v<N>.md        a record metadata schema's document
  metadata-<name>/v<N>.schema.json   ... and its machine schema, beside it
  environment-<type>/v<N>.md     a signed environment payload's document
  environment-<type>/v<N>.schema.json  ... and its machine schema, beside it
  driver-contract/v<N>.md        the driver contract, one per contract version
  driver-contract/v<N>.schema.json   ... and the schema of its JSON documents
  build-ledger/v<N+1>.md         a working draft of the next major version, on a program trunk only

A schema and its document share a major version and change together; a new major version adds v<N+1>.schema.json and v<N+1>.md beside the old pair, which stays for ledgers already written.

While the componentization program runs (FLOW-20), the next major version of the ledger format, or of a schema it adds or changes, may be developed as a working draft beside the current one, on a program trunk only. Each draft document opens with this status block:

Working draft, unreleased (FLOW-20). Not a released version of the ledger format. No released or pre-released build writes it; it may change until the program lands, when it is finalized as v.

and the Documents list below names it "v (working draft, unreleased)". Only tests and conformance suites write a draft; every ledger a release wrote is v1. A draft reaches main only finalized, when the program lands: specs/specs_test.go fails a document with the status block on a pull request or push to main.

Documents

$idDocumentMachine schema
https://github.com/buildwarden/buildwarden/schemas/v1/http-open.jsonmetadata-http-open v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/http-headers.jsonmetadata-http-headers v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/http-body.jsonmetadata-http-body v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/artifact.jsonmetadata-artifact v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/redacted.jsonmetadata-redacted v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/environment.jsonmetadata-environment v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/environment-container.jsonmetadata-environment-container v1 (legacy)v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/environment-oci-image.jsonenvironment-oci-image v1v1.schema.json
https://github.com/buildwarden/buildwarden/schemas/v1/environment-vm-disk-chain.jsonenvironment-vm-disk-chain v1v1.schema.json

$id policy

A schema's $id is a stable name, not a location. Ledgers list these strings in their header's schemas array, so they never change:

  • The $ids above, of the form https://github.com/buildwarden/buildwarden/schemas/v1/<name>.json, date from before this layout and are kept for good. They do not resolve to a file; use the table above to find one.
  • A schema added after this layout takes an $id that mirrors its path: https://github.com/buildwarden/buildwarden/specs/<dir>/v<N>.schema.json.