Files
mesh-delivery/contracts/seats/mesh-wants/seat.json
T

285 lines
7.9 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"
}
}
],
"events": [
{
"name": "policy-changed",
"body": {
"type": "object"
}
}
],
"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"
}
}
},
"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"
}
]
}