Files
mesh-delivery/contracts/parts/build-step.json
T
jschoubben 17517b9f4e CT5: the build seats' accepted kinds step and run, and the state detected-steps
Builds: design 47 G §22, §338 (accepted kinds step, runner alone; run, node-build-go,
callers the runner, the indexer, the assigner and the checker), §326, §414 (state
detected-steps, one key per artifact, apart from today's step keys steps).

Not built: §415's kind names check.step, check.run, delivery.step (the definition
reader refuses a dotted accepted-kind name); stopped on that question.

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 10:44:58 +01:00

1647 lines
45 KiB
JSON

{
"format": 1,
"part": "build-step",
"description": "What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).",
"verbs": [
{
"name": "current",
"description": "The asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
"input": {
"type": "object",
"properties": {}
},
"answer": {
"type": "object",
"description": "the steps running, the capacity and whether paused"
}
},
{
"name": "pause",
"description": "Take no new ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module. A capacity of 0 is the lasting way to keep a node from building.",
"input": {
"type": "object",
"properties": {}
},
"answer": {
"type": "object",
"description": "whether the node is paused"
}
},
{
"name": "resume",
"description": "Take asks again on this node.",
"input": {
"type": "object",
"properties": {}
},
"answer": {
"type": "object",
"description": "whether the node is paused"
}
},
{
"name": "drop",
"description": "End an ask this node holds for a caller that no longer waits for it: a step not yet running is ended dropped when the bus gives it, one running is cancelled; both end the step dropped, naming who dropped it and why. Writes dropped.<id> in the pauses state; the build module removes the key when it has acted.",
"callers": [
"seat:mesh-pipeline-runner",
"seat:mesh-builds"
],
"input": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "the ask's id"
},
"by": {
"type": "string",
"description": "who drops it"
},
"why": {
"type": "string",
"description": "why the caller no longer waits"
}
},
"required": [
"id",
"why"
]
},
"answer": {
"type": "object",
"description": "whether the ask was held here"
},
"class": "act"
},
{
"name": "kept-artifact",
"description": "The one build this node keeps instead of storing it through the seat oci-artifact-registry: the new build of that seat's holder, when the running holder refused or did not answer the store (design 47 *The artifact store's holder takes its own new build even when its seat is the one broken*). Answers where the bytes are, as an object by their digest on the bus (the old objects form, ADR 0619 \u00a72), never in the answer; the node-engine checks what it fetched against the digest and applies nothing that differs. A module that claims no oci-artifact-registry is refused by name, so a store outage never becomes a delivery from build nodes; so is a build this node no longer keeps, or keeps under another digest.",
"input": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module, the holder of oci-artifact-registry",
"minLength": 1
},
"fp": {
"type": "string",
"description": "its build's fingerprint",
"minLength": 1
},
"digest": {
"type": "string",
"description": "the artifact's sha256, 64 lowercase hex digits, as the builder's done key names it",
"pattern": "^[0-9a-f]{64}$"
}
},
"required": [
"module",
"fp",
"digest"
]
},
"answer": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module asked"
},
"fp": {
"type": "string",
"description": "the fingerprint asked"
},
"digest": {
"type": "string",
"description": "the digest of the bytes kept",
"pattern": "^[0-9a-f]{64}$"
},
"size": {
"type": "integer",
"description": "bytes"
},
"store": {
"type": "string",
"description": "the object store the bytes are in, the build module's kept builds, as its manifest's objects names it on the bus"
},
"object": {
"type": "string",
"description": "the object's name in it: the digest"
},
"refused": {
"type": "string",
"enum": [
"claims no oci-artifact-registry",
"not kept",
"digest differs"
],
"description": "why nothing is answered: the module claims no oci-artifact-registry, this node keeps no build of it at that fingerprint (never kept, or swept), or keeps it under another digest"
},
"words": {
"type": "string",
"description": "the refusal in words, naming the module"
},
"error": {
"type": "string",
"description": "why it could not answer"
}
},
"required": [
"module",
"fp"
]
},
"callers": [
"seat:node-engine"
],
"class": "read"
},
{
"name": "steps",
"description": "Which pipeline steps an artifact can run, found by its language's convention (design 47 *Pipeline steps and the policy*): lint always, unit and integration tests where its packages hold them. Kept by the artifact's fingerprint; again finds them anew.",
"callers": [
"seat:mesh-pipeline-runner",
"seat:mesh-catalog"
],
"input": {
"type": "object",
"properties": {
"module": {
"type": "string"
},
"artifact": {
"type": "string",
"description": "the artifact reference, <module>:<artifact>"
},
"fingerprint": {
"type": "string"
},
"fetch": {
"$ref": "#/defs/Fetch"
},
"again": {
"type": "boolean",
"description": "find them anew, not from the kept answer"
}
},
"required": [
"module",
"artifact",
"fetch"
]
},
"answer": {
"type": "object",
"properties": {
"artifact": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/defs/DetectedStep"
}
},
"kept": {
"type": "boolean",
"description": "answered from the kept answer"
}
},
"required": [
"artifact",
"steps"
]
},
"class": "act"
}
],
"defs": {
"StepAsk": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"id": {
"type": "string"
},
"kind": {
"type": "string",
"description": "build, check, compose or step"
},
"language": {
"type": "string",
"description": "go, typescript or image"
},
"asker": {
"type": "string"
},
"at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
},
"build": {
"type": "object",
"properties": {
"module": {
"type": "string"
},
"path": {
"type": "string"
},
"fp": {
"type": "string"
},
"fetch": {
"$ref": "#/defs/Fetch"
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/defs/AskArtifact"
}
},
"publish": {
"type": "boolean"
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed"
}
},
"required": [
"module",
"artifacts"
]
},
"check": {
"type": "object",
"properties": {
"fetch": {
"$ref": "#/defs/Fetch"
},
"levels": {
"type": "array",
"items": {
"type": "string",
"description": "unit or integration"
}
},
"kept": {
"type": "boolean"
},
"runner": {
"type": "string"
},
"runner_when": {
"type": "string"
},
"run": {
"type": "string"
},
"packages": {
"type": "array",
"items": {
"type": "string"
}
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed",
"description": "the toolchain the checker agreed for the language (ADR 0584 clause 2): a node on another declines the check"
},
"node-names": {
"type": "array",
"items": {
"type": "string"
},
"description": "the node names the check's tests run against"
}
},
"required": [
"fetch",
"levels"
]
},
"compose": {
"type": "object",
"properties": {
"fetch": {
"$ref": "#/defs/Fetch"
},
"dir": {
"type": "string"
},
"package": {
"type": "string"
},
"request": {
"description": "the compose-candidate request, in one of two forms: the request as a JSON object, or, for one near the bus's message limit, a JSON string \"gzip+base64:\" followed by the base64 of the request object gzip-compressed; a holder that does not know the packed form refuses it, naming that it holds no request object"
},
"reader": {
"type": "string"
}
},
"required": [
"fetch",
"dir",
"package",
"request"
]
},
"run": {
"$ref": "#/defs/RunJob",
"description": "a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose"
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "package to the tagged version a build pins"
},
"step": {
"$ref": "#/defs/StepRun",
"description": "a pipeline step: lint, unit tests or integration tests of one artifact at one commit, sent by the runner as the accepted kind step (design 47 *The steps and who serves them*)"
}
},
"required": [
"id",
"kind",
"language",
"asker"
],
"description": "one ask of a build module"
},
"BuildAnswer": {
"type": "object",
"properties": {
"artifacts": {
"type": "array",
"items": {
"$ref": "#/defs/BuiltArtifact"
}
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed"
},
"imports": {
"type": "array",
"items": {
"type": "string"
}
},
"out-of-step": {
"type": "array",
"items": {
"type": "string"
}
},
"kept": {
"type": "string",
"description": "the digest of the artifact this node kept for the artifact store's holder instead of storing it through the seat oci-artifact-registry (the verb kept-artifact serves it); the keeping node is the step's own; absent when every artifact was stored"
}
},
"required": [
"artifacts"
]
},
"CheckAnswer": {
"type": "object",
"properties": {
"fetch": {
"$ref": "#/defs/FetchAnswer"
},
"levels": {
"type": "array",
"items": {
"$ref": "#/defs/LevelAnswer"
}
}
},
"required": [
"fetch"
]
},
"ComposeAnswer": {
"type": "object",
"properties": {
"built": {
"type": "boolean"
},
"key": {
"type": "string"
},
"verdict": {
"description": "the compose-candidate verdict"
}
},
"required": [
"built"
]
},
"RunJob": {
"type": "object",
"description": "a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for",
"properties": {
"program": {
"$ref": "#/defs/RunProgram"
},
"heads": {
"type": "array",
"items": {
"$ref": "#/defs/RunHead"
},
"description": "the commits the program reads, a repository at most once"
},
"input": {
"$ref": "#/defs/RunInput"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "the program's arguments, each a word or a flag"
},
"reader": {
"type": "string",
"description": "what the run is for, for a reader of the ask"
}
},
"required": [
"program",
"heads",
"input"
]
},
"RunProgram": {
"type": "object",
"description": "where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path",
"properties": {
"repository": {
"type": "string"
},
"commit": {
"type": "string"
},
"dir": {
"type": "string"
},
"package": {
"type": "string"
}
},
"required": [
"repository",
"commit",
"dir",
"package"
]
},
"RunHead": {
"type": "object",
"description": "one commit a run's program reads",
"properties": {
"repository": {
"type": "string"
},
"commit": {
"type": "string"
}
},
"required": [
"repository",
"commit"
]
},
"RunInput": {
"type": "object",
"description": "a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB",
"properties": {
"verb": {
"type": "string"
},
"digest": {
"type": "string",
"description": "64 lowercase hex digits"
},
"size": {
"type": "integer",
"description": "bytes"
}
},
"required": [
"verb",
"digest",
"size"
]
},
"RunAnswer": {
"type": "object",
"description": "what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error",
"properties": {
"built": {
"type": "boolean"
},
"key": {
"type": "string"
},
"exit": {
"type": "integer"
},
"output": {
"description": "raw when it is JSON, else a JSON string"
},
"said": {
"type": "string"
}
},
"required": [
"built",
"key",
"exit"
]
},
"Step": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"id": {
"type": "string"
},
"tool": {
"type": "string"
},
"node": {
"type": "string"
},
"state": {
"type": "string",
"description": "running, again (ended on a transport fault, to be given again by the bus after again-at), passed, failed, refused or dropped (ended by the verb drop, its cause the reason)"
},
"started": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
},
"ended": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
},
"reason": {
"type": "string"
},
"result": {
"$ref": "#/defs/StepResult"
},
"what": {
"type": "string"
},
"phase": {
"type": "string"
},
"phase-at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
},
"owner": {
"type": "string"
},
"run": {
"type": "integer",
"description": "which run of the ask this is, counted by the bus's delivery count (1 for the first)"
},
"again-at": {
"type": "string",
"description": "when the bus gives the ask again, for the state again (RFC 3339 time)",
"format": "date-time"
},
"passing": {
"type": "boolean",
"description": "true when the step ended on a fault that passes (a transport fault), so a failed end after the last run says so"
}
},
"required": [
"id",
"tool",
"node",
"state",
"started"
],
"description": "one step a build module runs on a node"
},
"Toolchain": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"language": {
"type": "string",
"description": "go or typescript"
},
"version": {
"type": "string"
},
"recipe": {
"type": "string"
},
"at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
}
},
"required": [
"language",
"version",
"recipe"
],
"description": "the toolchain a node reports"
},
"Drop": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"by": {
"type": "string"
},
"why": {
"type": "string"
},
"at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
}
},
"required": [
"why"
],
"description": "an ask a caller no longer waits for"
},
"Pause": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"paused": {
"type": "boolean"
},
"by": {
"type": "string"
},
"at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
}
},
"required": [
"paused"
],
"description": "whether the node takes no new ask"
},
"Capacity": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"effective": {
"type": "integer"
},
"configured": {
"type": "integer"
},
"configured-from": {
"type": "string"
},
"quota-cores": {
"type": "number"
},
"quota-from": {
"type": "string"
},
"cores-per-step": {
"type": "number"
},
"by-cpu": {
"type": "integer"
},
"build-hours": {
"type": "string"
},
"outside-hours": {
"type": "boolean"
},
"build-hours-fault": {
"type": "string"
},
"ineligible": {
"type": "string"
},
"why": {
"type": "string"
},
"at": {
"type": "string",
"description": "when (RFC 3339 time)",
"format": "date-time"
}
},
"required": [
"effective",
"configured",
"why"
],
"description": "how many steps the node runs at once"
},
"Fetch": {
"type": "object",
"description": "what a build module's fetch tool is asked: the repository and the full commit, the pull request's ref when only its head carries the commit, the trunk commit to merge onto for a merge preview, the module's directory and named paths, the mesh packages to build against, and the sibling repositories placed beside",
"properties": {
"repository": {
"type": "string",
"description": "<owner>/<name>"
},
"commit": {
"type": "string",
"description": "the full commit"
},
"ref": {
"type": "string",
"description": "the pull request's ref, when only its head carries the commit"
},
"base": {
"type": "string",
"description": "the trunk commit a merge preview merges onto"
},
"dir": {
"type": "string",
"description": "the module's directory in the repository (\".\" for its root), with paths"
},
"paths": {
"type": "array",
"items": {
"type": "string"
},
"description": "the paths the module names, relative to dir"
},
"packages": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "the version (a full commit) of each mesh package to build against, by its module path"
},
"package": {
"type": "object",
"description": "the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"repository": {
"type": "string"
},
"commit": {
"type": "string"
},
"ref": {
"type": "string"
}
}
},
"beside": {
"type": "array",
"items": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"commit": {
"type": "string"
}
},
"required": [
"repository",
"commit"
]
},
"description": "the sibling repositories placed beside the fetched tree"
}
},
"required": [
"repository",
"commit"
]
},
"ToolchainUsed": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"version": {
"type": "string"
},
"recipe": {
"type": "string"
}
},
"required": [
"language",
"version",
"recipe"
],
"description": "the toolchain a build was made with: the language, the installed version and the build module's recipe"
},
"AskArtifact": {
"type": "object",
"properties": {
"artifact": {
"type": "string"
},
"from": {
"type": "string"
},
"seat": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"artifact"
],
"description": "one artifact of a build ask: built from the fetched tree, or copied from an upstream pin"
},
"BuiltArtifact": {
"type": "object",
"properties": {
"artifact": {
"type": "string"
},
"digest": {
"type": "string"
},
"reference": {
"type": "string"
}
},
"required": [
"artifact",
"digest"
],
"description": "one artifact a build made: its digest and the reference it was published under"
},
"LevelAnswer": {
"type": "object",
"properties": {
"level": {
"type": "string"
},
"judged": {
"type": "string"
},
"digest": {
"type": "object",
"properties": {
"level": {
"type": "string"
},
"packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string"
},
"digest": {
"type": "string"
}
},
"required": [
"package",
"digest"
]
}
},
"beside": {
"type": "array",
"items": {
"type": "string"
}
},
"without_tests": {
"type": "array",
"items": {
"type": "string"
}
},
"judged_by": {
"type": "string"
},
"needs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string"
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"kept": {
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string"
},
"digest": {
"type": "string"
},
"tests": {
"type": "integer"
}
}
}
},
"tests": {
"type": "array",
"items": {
"description": "one test's result"
}
},
"unmet": {
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string"
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"required": [
"level"
],
"description": "one level of a check ask: the digest's answer, the kept verdicts taken, one test result per test step run, and the packages the node could not test"
},
"StepResult": {
"type": "object",
"description": "what a step answered, by the kind of ask: a build's artifacts, toolchain, imports, out-of-step modules and the artifact it kept; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five",
"properties": {
"artifacts": {
"type": "array",
"items": {
"$ref": "#/defs/BuiltArtifact"
}
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed"
},
"imports": {
"type": "array",
"items": {
"type": "string"
}
},
"out-of-step": {
"type": "array",
"items": {
"type": "string"
}
},
"kept": {
"type": "string",
"description": "the digest of the artifact this node kept for the artifact store's holder instead of storing it through the seat oci-artifact-registry (the verb kept-artifact serves it); the keeping node is the step's own; absent when every artifact was stored"
},
"fetch": {
"$ref": "#/defs/FetchAnswer"
},
"levels": {
"type": "array",
"items": {
"$ref": "#/defs/LevelAnswer"
}
},
"built": {
"type": "boolean"
},
"key": {
"type": "string"
},
"verdict": {
"description": "the compose-candidate verdict (the composer's own layout)"
},
"declined": {
"type": "boolean",
"description": "the holder declined the ask: its node lacks what the ask needs"
},
"needs": {
"type": "array",
"items": {
"type": "string"
},
"description": "what the declined ask needs"
},
"lacks": {
"type": "array",
"items": {
"type": "string"
},
"description": "what the holder's node lacks of it"
},
"exit": {
"type": "integer",
"description": "a run's program's exit status"
},
"output": {
"description": "a run's program's last line of standard output: raw when it is JSON, else a JSON string"
},
"said": {
"type": "string",
"description": "a run's program's first line of standard error, or why the step could not run it"
}
}
},
"ModuleTree": {
"type": "object",
"description": "the tree of one module directory in a merge preview: its git tree, the digest of its manifest, the lock files' digests and the digests of the named paths",
"properties": {
"tree": {
"type": "string"
},
"manifest": {
"type": "string"
},
"locks": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"paths": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"packages": {
"type": "array",
"items": {
"type": "string"
},
"description": "no longer filled (ADR 0593 section 2); kept so a preview written before still reads"
}
},
"required": [
"tree",
"manifest"
]
},
"Program": {
"type": "object",
"description": "a changed file that is a compiled program (issue 1577): its path, its executable format, and the commit of the branch that added it when the merge's tree no longer holds it",
"properties": {
"path": {
"type": "string"
},
"kind": {
"type": "string",
"description": "ELF, Mach-O or PE"
},
"commit": {
"type": "string"
}
},
"required": [
"path",
"kind"
]
},
"PlacedBeside": {
"type": "object",
"description": "a sibling repository placed as a plain directory under the workspace's beside directory",
"properties": {
"repository": {
"type": "string"
},
"commit": {
"type": "string"
},
"dir": {
"type": "string"
}
},
"required": [
"repository",
"commit",
"dir"
]
},
"TakenVersion": {
"type": "object",
"description": "of a directory whose go.mod requires an asked mesh package, the version it is built against: the asked one, or go.mod's when it names a newer one, said",
"properties": {
"dir": {
"type": "string"
},
"package": {
"type": "string"
},
"asked": {
"type": "string"
},
"named": {
"type": "string"
},
"built": {
"type": "string"
},
"sum": {
"type": "string"
},
"said": {
"type": "string"
}
},
"required": [
"dir",
"package",
"asked",
"named",
"built"
]
},
"FetchRefusal": {
"type": "object",
"description": "a TypeScript module whose packages the fetch did not install, with why",
"properties": {
"module": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"module",
"reason"
]
},
"FetchAnswer": {
"type": "object",
"description": "what a build module's fetch tool answers, whole: the workspace it made, the commit in it, the module directories found; and, when the call gave a base, the merge preview (the trunk commit, the merge commit, the files that conflict, the paths the merge changes, the compiled programs among them, the tree of each module directory). A head that does not merge cleanly is an answer, not an error: merge is empty and conflicts names the files. The Go module adds the sibling repositories placed and the package versions taken; the TypeScript module the directories installed and refused and the group's package",
"properties": {
"workspace": {
"type": "string"
},
"commit": {
"type": "string"
},
"modules": {
"type": "array",
"items": {
"type": "string"
}
},
"base": {
"type": "string"
},
"merge": {
"type": "string"
},
"conflicts": {
"type": "array",
"items": {
"type": "string"
}
},
"changed": {
"type": "array",
"items": {
"type": "string"
}
},
"programs": {
"type": "array",
"items": {
"$ref": "#/defs/Program"
}
},
"trees": {
"type": "object",
"additionalProperties": {
"$ref": "#/defs/ModuleTree"
}
},
"beside": {
"type": "array",
"items": {
"$ref": "#/defs/PlacedBeside"
}
},
"packages": {
"type": "array",
"items": {
"$ref": "#/defs/TakenVersion"
}
},
"installed": {
"type": "array",
"items": {
"type": "string"
}
},
"refused": {
"type": "array",
"items": {
"$ref": "#/defs/FetchRefusal"
}
},
"group": {
"type": "string"
}
},
"required": [
"workspace",
"commit",
"modules"
]
},
"StepNames": {
"type": "object",
"description": "the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part",
"properties": {
"modules": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "every module the registrations name"
},
"repositories": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "every repository a registration's git origin names, as <owner>/<name>"
},
"branches": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "every watched branch a registration names"
}
},
"required": [
"modules",
"repositories",
"branches"
]
},
"KeptResult": {
"type": "object",
"description": "a package's passing result the runner keeps, by the digest of what its tests read (ADR 0666 section 8): the step runs no package whose digest and level it names",
"properties": {
"package": {
"type": "string"
},
"digest": {
"type": "string",
"description": "sha256:<hex> of what the package's tests read"
},
"level": {
"type": "string",
"description": "unit or integration"
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed"
},
"pipeline": {
"type": "string",
"description": "the pipeline whose step kept it"
}
},
"required": [
"package",
"digest",
"level"
]
},
"TestCounts": {
"type": "object",
"description": "how many tests a step ran and carried, per level (ADR 0666 section 8: the pipeline's end names any repository or catalog module over the test budget)",
"properties": {
"unit": {
"type": "integer"
},
"integration": {
"type": "integer"
}
}
},
"StepRun": {
"type": "object",
"description": "one pipeline step of one artifact at one commit (ADR 0666 sections 7, 8, 17): the step a build seat runs in its sandbox from the change's own heads, the names the lint step needs and the kept results it may skip",
"properties": {
"pipeline": {
"type": "string",
"description": "the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
},
"step": {
"type": "string",
"enum": [
"lint",
"unit",
"integration"
],
"description": "the pipeline step"
},
"module": {
"type": "string"
},
"artifact": {
"type": "string",
"description": "the artifact reference, <module>:<artifact>"
},
"branch": {
"type": "string",
"description": "the watched branch, or the branch of a run on request"
},
"commit": {
"type": "string",
"description": "the commit the step runs at"
},
"revision": {
"type": "integer",
"description": "the source revision of the watched branch the pipeline runs for; absent for a run on request"
},
"fingerprint": {
"type": "string",
"description": "the artifact's build-input fingerprint at the commit"
},
"fetch": {
"$ref": "#/defs/Fetch",
"description": "where the step reads the change's heads"
},
"toolchain": {
"$ref": "#/defs/ToolchainUsed"
},
"names": {
"$ref": "#/defs/StepNames"
},
"kept": {
"type": "array",
"items": {
"$ref": "#/defs/KeptResult"
},
"description": "the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*)"
},
"rerun": {
"type": "boolean",
"description": "the step is asked again by the runner's rerun"
},
"by": {
"type": "string",
"description": "for a rerun, the caller the runtime proved"
}
},
"required": [
"pipeline",
"step",
"module",
"artifact",
"commit",
"fingerprint",
"fetch",
"names"
]
},
"StepEnded": {
"type": "object",
"description": "a pipeline step's end, said by the build seat's holder on the node that ran it (ADR 0666 sections 7, 21): the runner takes it only from that holder's account, naming the ask, the commit and the fingerprint it was asked at",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"id": {
"type": "string",
"description": "the ask's id"
},
"pipeline": {
"type": "string"
},
"step": {
"type": "string",
"enum": [
"lint",
"unit",
"integration"
]
},
"module": {
"type": "string"
},
"artifact": {
"type": "string"
},
"commit": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"node": {
"type": "string",
"description": "the node that ran it, as in the subject"
},
"outcome": {
"type": "string",
"enum": [
"passed",
"failed",
"nothing to run",
"could not run"
],
"description": "never passed for a step that ran nothing"
},
"tests": {
"$ref": "#/defs/TestCounts"
},
"carried": {
"type": "array",
"items": {
"$ref": "#/defs/KeptResult"
},
"description": "the packages not run because the ask's kept results held them"
},
"kept": {
"type": "array",
"items": {
"$ref": "#/defs/KeptResult"
},
"description": "the packages that passed at their digest, for the runner to keep"
},
"said": {
"type": "string",
"description": "why it failed or could not run, naming the part not heard"
},
"output": {
"type": "string",
"description": "the step's output when it fits the message"
},
"output-object": {
"type": "string",
"description": "the output's object in the sender's sent store, when over the per-message limit (ADR 0666 section 16)"
},
"rerun": {
"type": "boolean"
},
"by": {
"type": "string",
"description": "for a rerun, the caller the runtime proved"
},
"started": {
"type": "string",
"format": "date-time"
},
"ended": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"pipeline",
"step",
"module",
"artifact",
"commit",
"fingerprint",
"node",
"outcome"
]
},
"DetectedStep": {
"type": "object",
"properties": {
"step": {
"type": "string",
"enum": [
"lint",
"unit",
"integration"
]
},
"packages": {
"type": "array",
"items": {
"type": "string"
},
"description": "the packages the step runs, by the language's convention"
}
},
"required": [
"step"
]
},
"DetectedSteps": {
"type": "object",
"description": "the steps detected for one artifact at its newest build-input fingerprint, replaced when a newer fingerprint is detected and by steps with again (design 47 G section 326)",
"properties": {
"v": {
"type": "integer"
},
"fingerprint": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/defs/DetectedStep"
}
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"v",
"fingerprint",
"steps"
]
}
},
"events": [
{
"name": "step-ended",
"subject": "step-ended.<node>",
"body": {
"$ref": "#/defs/StepEnded"
},
"keep": {
"max-age-days": 90,
"max-mib": 128
}
}
]
}