Files
mesh-delivery/contracts/seats/mesh-wants/seat.json
T
jschoubben 6c852a8eea Assigner: hears build.ended and version-released, reads no build log; a want's version and parts come from them
A kept build's or another branch's build names its parts and keeping node from build.ended; the trunk's entry names its version and parts from the version-released whose source is the kept assignment graph revision's. The parts' contract comment says <module>:<artifact>.

Builds: design 47 G §379, §525, §526, A-94, A-96, A-67

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-11 23:32:50 +01:00

1323 lines
36 KiB
JSON

{
"format": 1,
"seat": "mesh-wants",
"scope": "mesh",
"grain": "whole",
"domain": "Delivery",
"decision": "novox/hq ADR 0565, ADR 0634, ADR 0635",
"description": "The seat that says what each node should run and whether each module's new builds wait for a person (ADR 0565, ADR 0539).",
"verbs": [
{
"name": "upgrade",
"description": "Whether each module's new builds wait for a person: its policy (roll, together or record) and where it comes from (a person, the module, the bus, its irreplaceable data, the default); the bus is never rolled. With module, that one; with module, policy and why, a person's choice for it, recorded as a hand act; with policy default, the choice taken back. With compare, each node's own composition and the assigner's findings.",
"input": {
"properties": {
"compare": {
"description": "\"true\": each node's own composition, by its digest, and the assigner's findings",
"enum": [
"true",
"false"
],
"type": "string"
},
"module": {
"description": "one module",
"type": "string"
},
"policy": {
"description": "with module: roll, together, record, or default to take a person's choice back",
"type": "string"
},
"why": {
"description": "with policy: why, required and kept",
"type": "string"
}
},
"type": "object"
},
"answer": {
"type": "object",
"description": "each module's policy, or the one chosen, or the comparison"
}
},
{
"name": "bus",
"description": "What a bus upgrade would do: the fingerprint of the bus module each node runs against the indexer's newest, and the last bus steps from the hand-act log and the assigner's puts of the bus. Read-only: the step itself is the put on the operator's warrant.",
"input": {
"properties": {},
"type": "object"
},
"answer": {
"type": "object",
"description": "what a bus upgrade would do, read only"
}
},
{
"name": "revision",
"description": "The assignment half of the revision view (ADR 0656 \u00a76): one assignment graph revision, named by its own number and naming its inputs, with its entries' digests; the trunk's newest when none is named, or a candidate's for its group and heads. Reads only.",
"input": {
"type": "object",
"properties": {
"revision": {
"type": "integer",
"description": "a kept revision; absent: the newest of trunk, or of the candidate named"
},
"group": {
"type": "string",
"description": "a candidate's group"
},
"heads": {
"type": "string",
"description": "a candidate's heads"
}
}
},
"answer": {
"type": "object",
"properties": {
"revision": {
"$ref": "#/defs/AssignmentRevision"
}
},
"required": [
"revision"
]
},
"class": "read"
},
{
"name": "entry",
"description": "One entry of an assignment graph revision whole, by its digest or by its node and module in a revision, with the seat rule that gave each edge. Reads only.",
"input": {
"type": "object",
"properties": {
"revision": {
"type": "integer",
"description": "a kept revision; absent: the newest of trunk, or of the candidate named"
},
"group": {
"type": "string",
"description": "a candidate's group"
},
"heads": {
"type": "string",
"description": "a candidate's heads"
},
"digest": {
"type": "string"
},
"node": {
"type": "string"
},
"module": {
"type": "string"
}
}
},
"answer": {
"type": "object",
"properties": {
"digest": {
"type": "string"
},
"entry": {
"$ref": "#/defs/AssignmentEntry"
}
},
"required": [
"digest",
"entry"
]
},
"class": "read"
},
{
"name": "difference",
"description": "A change's graph difference, which is its delivery: two kept revisions compared, or a candidate's newest against trunk's newest, with the changed module versions, the touched nodes and the order as tiers. Reads only.",
"input": {
"type": "object",
"properties": {
"from": {
"type": "integer"
},
"to": {
"type": "integer"
},
"group": {
"type": "string"
},
"heads": {
"type": "string"
}
}
},
"answer": {
"$ref": "#/defs/Difference"
},
"class": "read"
},
{
"name": "input",
"class": "read",
"callers": [
"seat:node-build-go",
"seat:node-build-node",
"seat:node-build-image"
],
"description": "A step's input by its digest, as the assigner keeps it for the composition step it asked a build seat to run (design 47 G section 354).",
"input": {
"type": "object",
"properties": {
"digest": {
"type": "string",
"description": "the input's sha256"
}
},
"required": [
"digest"
]
},
"answer": {
"type": "object",
"properties": {
"digest": {
"type": "string",
"description": "the input's sha256"
},
"input": {
"type": "string",
"description": "the input's exact bytes, base64"
}
},
"required": [
"digest",
"input"
]
}
}
],
"accepts": [
{
"name": "step",
"body": {
"$ref": "#/defs/StepRun"
},
"callers": [
"seat:mesh-pipeline-runner"
]
}
],
"events": [
{
"name": "policy-changed",
"body": {
"type": "object"
}
},
{
"name": "assignment-revision",
"body": {
"type": "object",
"description": "an assignment graph revision kept",
"properties": {
"v": {
"type": "integer"
},
"revision": {
"type": "integer"
},
"kind": {
"type": "string"
},
"cause": {
"type": "string"
},
"group": {
"type": "string"
},
"heads": {
"type": "string"
},
"catalogs": {
"type": "array",
"items": {
"$ref": "#/defs/CatalogOf"
},
"minItems": 1,
"description": "the catalog graph revision of each watched branch a placement names, which the entries come from"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"v",
"revision",
"kind",
"catalogs"
]
}
},
{
"name": "difference",
"body": {
"type": "object",
"description": "a difference worked out between two revisions",
"properties": {
"v": {
"type": "integer"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
},
"source": {
"type": "integer"
},
"group": {
"type": "string"
},
"heads": {
"type": "string"
},
"changes": {
"type": "integer",
"description": "how many module versions it changes"
},
"nodes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"v",
"from",
"to"
]
}
},
{
"name": "wanted",
"subject": "wanted.<node>.<module>",
"keep": {
"last-per-subject": true
},
"body": {
"type": "object",
"description": "an entry written as a want, from a trunk revision only",
"properties": {
"v": {
"type": "integer"
},
"node": {
"type": "string"
},
"module": {
"type": "string"
},
"fp": {
"type": "string"
},
"revision": {
"type": "integer"
},
"source": {
"type": "integer"
},
"removed": {
"type": "boolean",
"description": "true when the assigner removes the want of that node and module (the node left, or the module was unplaced); fp is then the fingerprint last wanted there (design 47 G section 693)"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"v",
"node",
"module",
"fp",
"revision"
]
}
},
{
"name": "wait-held",
"body": {
"$ref": "#/defs/Wait"
}
},
{
"name": "wait-ended",
"body": {
"$ref": "#/defs/Wait"
}
},
{
"name": "filling",
"body": {
"$ref": "#/defs/Fill"
}
},
{
"name": "full",
"body": {
"$ref": "#/defs/Fill"
}
},
{
"name": "room",
"body": {
"$ref": "#/defs/Fill"
}
},
{
"name": "step-ended",
"subject": "step-ended.<node>",
"body": {
"$ref": "#/defs/StepEnded"
},
"keep": {
"max-age-days": 90,
"max-mib": 32
}
},
{
"name": "version-delivered",
"keep": {
"max-age-days": 90,
"max-mib": 64
},
"body": {
"type": "object",
"description": "a version delivered to every present machine that places it, and healthy (design 47 G section 376)",
"properties": {
"v": {
"type": "integer"
},
"module": {
"type": "string",
"description": "the module"
},
"version": {
"type": "string",
"description": "MAJOR.MINOR.PATCH"
},
"parts": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "the digest of each of its parts, by `<module>:<artifact>`"
},
"away": {
"type": "array",
"items": {
"type": "string"
},
"description": "the machines away when it was said"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"v",
"module",
"version",
"parts"
]
}
},
{
"name": "step-progress",
"subject": "step-progress.<node>",
"body": {
"type": "object",
"description": "a composition step's progress, said once a minute while the assigner runs it (design 47 G section 496)",
"properties": {
"asker": {
"type": "string"
},
"ask": {
"type": "string"
},
"phase": {
"type": "string",
"enum": [
"fetch",
"build",
"run",
"report"
]
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"asker",
"ask",
"phase",
"at"
]
}
}
],
"family": {
"name": "mesh-wants.events",
"max-age-days": 7
},
"states": [
{
"name": "wants",
"template": "state",
"key-forms": [
{
"key": "want.<node>.<module>",
"value": {
"type": "object",
"description": "a node's want for a module",
"properties": {
"v": {
"type": "integer"
},
"fp": {
"type": "string"
},
"composed": {
"type": "string"
},
"removed": {
"type": "boolean"
},
"newest": {
"type": "string"
},
"rule": {
"type": "integer",
"description": "the rule that holds the node back, 1 to 10"
},
"backup": {
"type": "string",
"description": "again or skip",
"enum": [
"again",
"skip"
]
},
"words": {
"type": "string"
},
"put": {
"type": "boolean"
},
"hold": {
"type": "boolean"
},
"yes": {
"type": "string"
},
"release": {
"type": "string"
},
"self": {
"type": "boolean"
},
"version": {
"type": "string",
"description": "the module's released version, for people; none for a build of another watched branch (design 47 G section 379)"
},
"parts": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "the digest of each of the module's parts, by `<module>:<artifact>`; the node-engine fetches and checks each part by it (design 47 G section 379)"
},
"kept-on": {
"type": "string",
"description": "for a kept build, the build node that keeps it, from the builder's build.ended; the node-engine fetches the build through that node's seat verb kept-artifact, and a want with none from the store (design 47 G section 526)"
}
}
},
"description": "a node's want for a module"
},
{
"key": "want.<node>.node",
"value": {
"type": "object",
"description": "a node's own want",
"properties": {
"v": {
"type": "integer"
},
"composed": {
"type": "string"
},
"words": {
"type": "string"
},
"self": {
"type": "boolean"
}
},
"required": [
"composed"
]
},
"description": "a node's own want, naming the digest of its own composition"
},
{
"key": "held.<module>.<fingerprint>",
"value": {
"type": "object",
"description": "a fingerprint the assigner holds",
"properties": {
"v": {
"type": "integer"
},
"node": {
"type": "string"
},
"words": {
"type": "string"
}
},
"required": [
"node"
]
},
"description": "a module's fingerprint the assigner holds"
}
],
"history": 20,
"description": "what each node should run, and the fingerprints held back"
},
{
"name": "differences",
"template": "state",
"key-forms": [
{
"key": "<node>.<module>",
"value": {
"type": "object",
"description": "the difference between a want and what is sent",
"properties": {
"v": {
"type": "integer"
},
"want": {
"type": "string"
},
"want-removed": {
"type": "boolean"
},
"sent": {
"type": "string"
},
"sent-build": {
"type": "string"
},
"rule": {
"type": "integer"
},
"unexplained": {
"type": "boolean"
},
"words": {
"type": "string"
}
}
},
"description": "a module on a node"
}
],
"history": 64,
"description": "differences between a want and what the node-engine is sent"
},
{
"name": "compositions",
"template": "state",
"key-forms": [
{
"key": "<group>.<heads>",
"value": {
"type": "object",
"description": "the composition verdict of a group's check at its heads",
"properties": {
"v": {
"type": "integer"
},
"group": {
"type": "string"
},
"heads": {
"type": "string",
"description": "12 lowercase hex digits"
},
"state": {
"type": "string",
"description": "pass, fail or waits"
},
"words": {
"type": "string"
},
"sdk": {
"type": "string"
},
"machines": {
"type": "array",
"items": {
"type": "string"
}
},
"machine": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"took": {
"type": "integer",
"description": "milliseconds"
}
},
"required": [
"group",
"heads",
"state"
]
},
"description": "a group's check at its heads"
}
],
"history": 5,
"description": "composition verdicts of a group's check; the checker reads them"
},
{
"name": "assignment-revisions",
"template": "objects",
"description": "the assignment graph revisions, each a list of its entries' digests naming its inputs, and each entry once by its digest; a revision is kept while a delivery record pins it or it is current (design 47)",
"key-forms": [
{
"key": "trunk.<revision>",
"value": {
"$ref": "#/defs/AssignmentRevision"
},
"description": "a trunk revision"
},
{
"key": "candidate.<group>.<heads>",
"value": {
"$ref": "#/defs/AssignmentRevision"
},
"description": "a candidate's newest revision, dropped on heads-replaced"
},
{
"key": "entry.<digest>",
"value": {
"$ref": "#/defs/AssignmentEntry"
},
"description": "an entry, written once, removed when no kept revision lists it"
}
]
},
{
"name": "inputs",
"template": "state",
"history": 1,
"description": "a step's input, named by its write time and its sha256 (design 47 G section 354)",
"key-forms": [
{
"key": "<time>.<digest>",
"value": {
"type": "string",
"description": "the input's bytes, base64"
},
"description": "one input"
}
]
}
],
"defs": {
"Edge": {
"type": "object",
"description": "an edge from one module version on a node to another: provisioning, contribution, or an acting part's version that is to act on it in a step (ADR 0656)",
"properties": {
"kind": {
"type": "string",
"description": "provisioning, contribution or acting"
},
"node": {
"type": "string"
},
"module": {
"type": "string"
},
"fp": {
"type": "string",
"description": "the other end's fingerprint"
},
"provision": {
"type": "string",
"description": "for provisioning, the provision"
},
"seat": {
"type": "string",
"description": "for contribution, the seat it contributes to; for acting, the seat whose rule gave the edge"
},
"step": {
"type": "string",
"description": "for acting, the step: take-in, validate, check, build, compose, grant or place"
},
"bound": {
"type": "string",
"description": "for acting, how long the new version may take before it acts"
}
},
"required": [
"kind",
"node",
"module"
]
},
"AssignmentEntry": {
"type": "object",
"description": "one module version on a node of an assignment graph revision, stored once by its digest (ADR 0656)",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"node": {
"type": "string"
},
"module": {
"type": "string"
},
"branch": {
"type": "string",
"description": "the watched branch its placement names, whose catalog graph the entry comes from (design 47 lines 523-525)"
},
"fp": {
"type": "string",
"description": "the fingerprint it is to run"
},
"catalog": {
"type": "string",
"description": "the digest of its catalog graph entry"
},
"edges": {
"type": "array",
"items": {
"$ref": "#/defs/Edge"
}
}
},
"required": [
"node",
"module",
"branch",
"fp",
"catalog"
]
},
"NodeEntryRef": {
"type": "object",
"properties": {
"node": {
"type": "string"
},
"module": {
"type": "string"
},
"digest": {
"type": "string",
"description": "the entry's digest, its object's name"
}
},
"required": [
"node",
"module",
"digest"
]
},
"AssignmentRevision": {
"type": "object",
"description": "an assignment graph revision: the list of its entries' digests and the inputs it was computed from, so it can be computed again and compared",
"properties": {
"v": {
"type": "integer",
"description": "the layout version"
},
"revision": {
"type": "integer",
"description": "counted by its holder"
},
"kind": {
"type": "string",
"description": "trunk or candidate"
},
"group": {
"type": "string"
},
"heads": {
"type": "string"
},
"catalogs": {
"type": "array",
"items": {
"$ref": "#/defs/CatalogOf"
},
"minItems": 1,
"description": "the catalog graph revision of each watched branch a placement names, which the entries come from"
},
"placements": {
"type": "string",
"description": "the digest of the placements it was computed from"
},
"capabilities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"node": {
"type": "string"
},
"digest": {
"type": "string",
"description": "the digest of the node's capability reading"
}
},
"required": [
"node",
"digest"
]
}
},
"cause": {
"type": "string",
"description": "what made it: catalog-revision, placement-changed or capabilities-changed"
},
"at": {
"type": "string",
"format": "date-time"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/defs/NodeEntryRef"
}
}
},
"required": [
"revision",
"kind",
"catalogs",
"placements",
"entries"
]
},
"Change": {
"type": "object",
"description": "one module on a node whose version differs between two revisions",
"properties": {
"node": {
"type": "string"
},
"module": {
"type": "string"
},
"from": {
"type": "string",
"description": "the fingerprint before; absent when it is new there"
},
"to": {
"type": "string",
"description": "the fingerprint after; absent when it goes"
},
"edges": {
"type": "array",
"items": {
"$ref": "#/defs/Edge"
},
"description": "the edges that moved"
}
},
"required": [
"node",
"module"
]
},
"Difference": {
"type": "object",
"description": "two assignment graph revisions compared: a change's delivery, with its order read off the edges and no plan stored (ADR 0656)",
"properties": {
"from": {
"type": "integer",
"description": "the revision compared from"
},
"to": {
"type": "integer",
"description": "the revision compared to"
},
"group": {
"type": "string"
},
"heads": {
"type": "string"
},
"changes": {
"type": "array",
"items": {
"$ref": "#/defs/Change"
}
},
"nodes": {
"type": "array",
"items": {
"type": "string"
},
"description": "the nodes it touches"
},
"tiers": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/defs/NodeEntryRef"
}
},
"description": "the order as a view: each tier the changes whose acting parts acted in the tiers before it (ADR 0603 \u00a76 as ADR 0656 changes it)"
},
"refused": {
"type": "array",
"items": {
"type": "object",
"properties": {
"module": {
"type": "string"
},
"why": {
"type": "string"
}
},
"required": [
"module",
"why"
]
},
"description": "a module whose fingerprint changed while the difference is empty, refused by name"
}
},
"required": [
"from",
"to",
"changes"
]
},
"Wait": {
"type": "object",
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs; the builder's toolchain wait is of this type too, with step build (design 47 G section 702)",
"properties": {
"step": {
"type": "string",
"enum": [
"take-in",
"validate",
"check",
"build",
"compose",
"grant",
"place",
"pipeline",
"put",
"delivery",
"kept-build",
"backup",
"outside"
],
"description": "which wait: an acting step of section 203 or put, delivery, kept-build, backup, or outside, a moved module's failing check held on an outside cause (design 47 G section 498, section 706)"
},
"part": {
"type": "string",
"description": "the acting part waited for"
},
"version": {
"type": "string",
"description": "its new version's fingerprint"
},
"node": {
"type": "string"
},
"module": {
"type": "string",
"description": "the entry that waits"
},
"fp": {
"type": "string"
},
"since": {
"type": "string",
"format": "date-time"
},
"bound": {
"type": "string",
"description": "a duration such as 30m"
},
"how": {
"type": "string",
"description": "on wait-ended: ran, released or superseded"
},
"by": {
"type": "string",
"description": "on a release, who released it and why"
},
"clock-from": {
"type": "string",
"format": "date-time",
"description": "the time the bound counts from (design 47 G section 266, section 269, section 498)"
},
"fingerprint": {
"type": "string",
"description": "a put's wait: the fingerprint of the build put"
},
"machines": {
"type": "array",
"items": {
"type": "string"
},
"description": "a dependent's delivery wait: the machines the dependency's version has yet to reach"
},
"owner": {
"type": "string",
"description": "the seat holding the wait (design 47 G section 512, section 629)"
},
"on": {
"type": "string",
"description": "what it waits on (design 47 G section 512, section 629)"
},
"words": {
"type": "string",
"description": "the wait in plain words (design 47 G section 512, section 629)"
}
},
"required": [
"step",
"since"
]
},
"Fill": {
"type": "object",
"description": "a store's fill against its cap",
"properties": {
"store": {
"type": "string",
"description": "the kept data, by its name in the holder's manifest"
},
"bytes": {
"type": "integer"
},
"cap": {
"type": "integer",
"description": "bytes"
},
"refused": {
"type": "string",
"description": "what full refuses"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"store",
"bytes",
"cap"
]
},
"StepRun": {
"type": "object",
"description": "the composition step of one module's pipeline (design 47 *Pipeline steps and the policy*, *The pipeline makes the check*): the assigner composes each machine's declaration at the change's heads with the composer built from them, in the build seat's sandbox, and refuses a change in which two modules own one path",
"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": [
"composition"
]
},
"module": {
"type": "string"
},
"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 catalog graph revision of the branch the pipeline runs for"
},
"source": {
"type": "integer",
"description": "the source revision of the watched branch; absent for a run on request"
},
"fingerprint": {
"type": "string",
"description": "the module's build-input fingerprint at the commit"
},
"run": {
"type": "string",
"description": "the run on request's id: its composition writes no want (ADR 0666 section 18)"
},
"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",
"branch",
"commit",
"fingerprint"
]
},
"StepEnded": {
"type": "object",
"description": "the composition step's end, said by the assigner on the node it runs on (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": [
"composition"
]
},
"module": {
"type": "string"
},
"commit": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"node": {
"type": "string",
"description": "the node the assigner ran it on, as in the subject"
},
"outcome": {
"type": "string",
"enum": [
"passed",
"failed",
"nothing to run",
"could not run"
],
"description": "never passed for a step that composed nothing"
},
"said": {
"type": "string",
"description": "why it failed or could not run: the two modules owning one path, the part not heard"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "a node asleep, passed with a warning (ADR 0593 section 9)"
},
"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",
"commit",
"fingerprint",
"node",
"outcome"
]
},
"CatalogOf": {
"type": "object",
"description": "one catalog graph revision of a watched branch the revision was computed from (design 47 lines 1416-1418)",
"properties": {
"branch": {
"type": "string",
"description": "the watched branch"
},
"revision": {
"type": "integer",
"description": "that branch's catalog graph revision"
},
"source": {
"type": "integer",
"description": "the source revision of that branch it carries"
}
},
"required": [
"branch",
"revision"
]
}
},
"acts": [
{
"step": "place",
"on": "every"
}
]
}