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 "vmain 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
- Ledger wire format, v1
- Driver contract, v1, with the schema of its JSON
documents,
v1.schema.json($idhttps://github.com/buildwarden/buildwarden/specs/driver-contract/v1.schema.json). Its examples are checked against the schema byspecs/specs_test.go.
$id | Document | Machine schema |
|---|---|---|
https://github.com/buildwarden/buildwarden/schemas/v1/http-open.json | metadata-http-open v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/http-headers.json | metadata-http-headers v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/http-body.json | metadata-http-body v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/artifact.json | metadata-artifact v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/redacted.json | metadata-redacted v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/environment.json | metadata-environment v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/environment-container.json | metadata-environment-container v1 (legacy) | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/environment-oci-image.json | environment-oci-image v1 | v1.schema.json |
https://github.com/buildwarden/buildwarden/schemas/v1/environment-vm-disk-chain.json | environment-vm-disk-chain v1 | v1.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 formhttps://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
$idthat mirrors its path:https://github.com/buildwarden/buildwarden/specs/<dir>/v<N>.schema.json.