D-4, D-5, D-6: the bootstrapped and test seat definitions are the contracts' files at milestone G's heads

The catalogue's tests of the retired delivery verbs go with them.

Builds: design 47 G §203, §309, §365, §302, §337, §336, §389, §390, §83, §307, §308, §260, §349, §375
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 11:27:05 +01:00
parent 77db185889
commit 66ad4956d5
44 changed files with 12333 additions and 480 deletions
+2 -3
View File
@@ -11,9 +11,8 @@ Only what go/catalogue's tests read is captured (R4b, issue 1379). Refreshed 202
repositories; before that it was mesh-controller's copy, which still held two modules that had left the catalogue.
mesh-catalog b5dbfbb784507e211372a7c9640d91f7d6dadd84 modules/*/module.json, modules/*/files/**, modules/*/templates/**, predefined.json
mesh-contracts 70fe186d7f5743e61f3ce2bbd97a8bfabc5b596e the seat files of the eight bootstrapped seats held there (seats/, health-and-repair/seats/, operator-and-conversation/seats/), as seat.json.captured
mesh-contracts bb16f99e2d5e854bb8f6552ce4b256e7c10e8ea0 of those, health-and-repair/seats/mesh-watchdogs and operator-and-conversation/seats/operator-channel (issue 1966)
mesh-delivery 932e7ccf025513ec4fce38a534c2c38defbc6701 contracts/seats/mesh-catalog and mesh-delivery-checker, as seat.json.captured (go/seatlist's bootstrap test)
mesh-contracts 5f7610f521bdb65ef72728022049d015e27ee93b the seat files of the eight bootstrapped seats held there (seats/, health-and-repair/seats/, operator-and-conversation/seats/), as seat.json.captured (milestone 47/G)
mesh-delivery c77e747f4e0cb829128c2fa7e80bf959c0af98c8 contracts/seats/mesh-catalog and mesh-delivery-checker, as seat.json.captured (go/seatlist's bootstrap test; milestone 47/G)
mesh-host cdcba9ca73755854d21e4e657d7e46c32b9b5265 internal/apply/placement_guard.go
The two seat copies are put back the same way (git show <commit>:<file> > <file>.captured, the path kept). To move the others, from this repository's go/ directory, with the two repositories checked out beside mesh-sdk:
@@ -84,15 +84,26 @@
},
{
"name": "resync",
"description": "Read every observer's findings again and raise and clear what differs from the open conditions: the recovery of a keeper that missed a change.",
"description": "Ask the observers to state their findings again, every one or the one named, and raise and clear what differs from the open conditions: the recovery of a keeper that missed a change. Each call is written in the hand-act log of the seat mesh-hand-acts (design 47 G 390).",
"input": {
"properties": {},
"type": "object"
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "ask this observer alone; none asks all"
}
},
"additionalProperties": false
},
"answer": {
"type": "object",
"description": "what was raised and cleared again"
}
},
"callers": [
"operator",
"healers",
"sessions"
]
}
],
"events": [
@@ -113,6 +124,40 @@
"body": {
"$ref": "#/defs/ConditionEvent"
}
},
{
"name": "findings-asked",
"keep": {
"max-age-days": 7,
"max-mib": 16
},
"body": {
"type": "object",
"description": "the keeper asks every observer, or one, to state its findings (design 47 G 384, 390)",
"properties": {
"ask": {
"type": "string",
"description": "the ask's id"
},
"at": {
"type": "string",
"format": "date-time"
},
"by": {
"type": "string",
"description": "who asked: the keeper, or the person or session that called resync"
},
"module": {
"type": "string",
"description": "to ask one observer; none asks all"
}
},
"required": [
"ask",
"at",
"by"
]
}
}
],
"family": {
@@ -363,6 +408,14 @@
"at": {
"type": "string",
"format": "date-time"
},
"owner": {
"type": "string",
"description": "the module the finding is about, when not the observer"
},
"waiting-on": {
"type": "string",
"description": "what it waits on: a person, a part or a call"
}
},
"required": [
@@ -380,7 +433,67 @@
"description": "one finding of the observer that wrote it"
}
],
"description": "every observer's findings, one key per finding; a key written raises or changes the condition of the same key, a key deleted clears it"
"description": "every observer's findings, one key per finding, kept in the observer's own state and read only by its owner's read tool; the keeper hears each change as the observer's events finding-written, finding-cleared and findings-stated (design 47 G 383, 434)"
},
{
"name": "findings-views",
"template": "state",
"description": "the keeper's sources: one key per observer and node, its last stated set with its at, its pending keys and the open asks; deleted when the module leaves the catalog or the node (design 47 G 388)",
"key-forms": [
{
"key": "<observer>.<node>",
"description": "one observer on one node",
"value": {
"type": "object",
"properties": {
"v": {
"type": "integer"
},
"observer": {
"type": "string"
},
"node": {
"type": "string"
},
"stated": {
"type": "object",
"description": "the last findings-stated set",
"properties": {
"at": {
"type": "string",
"format": "date-time"
},
"findings": {
"type": "array",
"items": {
"$ref": "#/bodies/Finding"
}
}
}
},
"pending": {
"type": "array",
"items": {
"type": "string"
},
"description": "the keys it cannot judge yet"
},
"asks": {
"type": "array",
"items": {
"type": "string"
},
"description": "the open asks"
}
},
"required": [
"v",
"observer",
"node"
]
}
}
]
}
],
"defs": {
@@ -643,5 +756,191 @@
"change"
]
}
},
"bodies": {
"Finding": {
"type": "object",
"description": "one finding as an observer says it: the layout whole, plus scope, id and since (design 47 G 437, 439)",
"properties": {
"kind": {
"type": "string"
},
"scope": {
"type": "string",
"description": "the key's first part: <scope>.<id>.<kind> (ADR 0564)"
},
"id": {
"type": "string",
"description": "the key's second part"
},
"at": {
"type": "string",
"format": "date-time"
},
"since": {
"type": "string",
"format": "date-time",
"description": "since when the finding stands"
},
"severity": {
"type": "string",
"enum": [
"urgent",
"warning"
]
},
"summary": {
"type": "string",
"description": "one line"
},
"headline": {
"type": "string"
},
"explanation": {
"type": "string"
},
"subject": {
"$ref": "#/defs/Subject"
},
"evidence": {
"type": "array",
"description": "newest first, at most 10",
"items": {
"$ref": "#/defs/Evidence"
}
},
"source": {
"type": "string",
"description": "the row, probe or event that saw it"
},
"observer": {
"type": "string",
"description": "the module that wrote it"
},
"owner": {
"type": "string",
"description": "the module the finding is about, when not the observer"
},
"waiting-on": {
"type": "string",
"description": "what it waits on: a person, a part or a call"
},
"actions": {
"type": "array",
"items": {
"$ref": "#/defs/Action"
}
},
"needs": {
"type": "string"
},
"resolver": {
"type": "string",
"description": "self, operator, agent or healer:<name>"
},
"ref": {
"type": "string",
"description": "the key's last part when it is not the kind"
},
"run": {
"type": "string",
"description": "what of its own saw it last"
}
},
"required": [
"kind",
"scope",
"id",
"at",
"since",
"severity",
"summary",
"subject",
"source",
"observer"
]
},
"FindingWritten": {
"$ref": "#/bodies/Finding"
},
"FindingCleared": {
"type": "object",
"description": "an observer no longer observes a finding",
"properties": {
"kind": {
"type": "string"
},
"scope": {
"type": "string"
},
"id": {
"type": "string"
},
"at": {
"type": "string",
"format": "date-time"
},
"why": {
"type": "string"
}
},
"required": [
"kind",
"scope",
"id",
"at",
"why"
]
},
"FindingsStated": {
"type": "object",
"description": "every finding an observer observes now, at its start and when asked (design 47 G 384, 439)",
"properties": {
"at": {
"type": "string",
"format": "date-time"
},
"asked": {
"type": "string",
"description": "the ask it answers; none at a start"
},
"findings": {
"type": "array",
"items": {
"$ref": "#/bodies/Finding"
}
},
"pending": {
"type": "array",
"description": "the keys the observer cannot judge yet since its start, with their since and bound",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"since": {
"type": "string",
"format": "date-time"
},
"bound": {
"type": "string",
"description": "a duration such as 5m"
}
},
"required": [
"key",
"since",
"bound"
]
}
}
},
"required": [
"at",
"findings",
"pending"
]
}
}
}
@@ -159,6 +159,86 @@
}
}
],
"events": [
{
"name": "machine-away",
"subject": "machine-away.<machine>",
"keep": {
"max-age-days": 90,
"max-mib": 16
},
"body": {
"type": "object",
"description": "the watchman's presence key of a machine expired (ADR 0564 4); published by the holder of this seat alone for another machine (design 47 G 436)",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"machine": {
"type": "string",
"description": "the machine whose presence changed"
},
"at": {
"type": "string",
"format": "date-time"
},
"last-heard": {
"type": "string",
"format": "date-time",
"description": "when the machine was last heard"
}
},
"required": [
"v",
"machine",
"at",
"last-heard"
]
}
},
{
"name": "machine-back",
"subject": "machine-back.<machine>",
"keep": {
"max-age-days": 90,
"max-mib": 16
},
"body": {
"type": "object",
"description": "a machine is heard again after it was away",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"machine": {
"type": "string",
"description": "the machine whose presence changed"
},
"at": {
"type": "string",
"format": "date-time"
},
"last-heard": {
"type": "string",
"format": "date-time",
"description": "when the machine was last heard"
}
},
"required": [
"v",
"machine",
"at",
"last-heard"
]
}
}
],
"family": {
"name": "mesh-watchdogs.events",
"max-age-days": 7
},
"states": [
{
"name": "presence",
@@ -126,7 +126,7 @@
},
"state": {
"type": "string",
"description": "open (open and held), ended or all; none is open when no key or since is given, else all"
"description": "open (open, held and held-back), ended or all; none is open when no key or since is given, else all"
},
"since": {
"type": "string",
@@ -154,7 +154,11 @@
},
"state": {
"type": "string",
"description": "how the ask stands: open, held, or how it ended (answered, expired, cancelled)"
"description": "how the ask stands: open, held (no ready channel), held-back (kept open behind the asker's newer asks, ADR 0666 §12), or how it ended (answered, expired, cancelled)"
},
"held-since": {
"type": "string",
"description": "when the ask was held back, RFC 3339; present while its state is held-back"
}
},
"required": [
@@ -176,6 +180,41 @@
"asks"
]
}
},
{
"name": "ask-again",
"description": "Offer a held-back ask now, on a channel that is ready: the asker's ask kept open behind its newer asks (design 47 G 83, 394).",
"class": "act",
"callers": [
"operator",
"healers"
],
"input": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "<asker>.<id> of the held-back ask"
}
},
"required": [
"key"
],
"additionalProperties": false
},
"answer": {
"type": "object",
"description": "where the ask stands after it was offered",
"properties": {
"state": {
"type": "string"
},
"error": {
"type": "string",
"description": "why it was not offered; set alone"
}
}
}
}
],
"accepts": [
@@ -248,7 +287,7 @@
},
"state": {
"type": "string",
"description": "how it stands: open, chosen, expired, cancelled, replaced or refused"
"description": "how it stands: open, held-back (kept open behind the asker's newer asks, ADR 0666 §12), chosen, expired, cancelled, replaced or refused"
},
"opened": {
"type": "string",
@@ -269,6 +308,10 @@
"type": "boolean",
"description": "its asker has been told how it ended"
},
"held-since": {
"type": "string",
"description": "when the ask was held back, RFC 3339; present while its state is held-back"
},
"answer": {
"type": "string",
"description": "how it ended, in words"
@@ -11,7 +11,9 @@
{
"name": "list",
"description": "Every entry the bus module created, its template, its settings and its fill against its cap.",
"callers": "any caller whose role grants it",
"callers": [
"invokers"
],
"input": {
"type": "object",
"properties": {
@@ -41,7 +43,9 @@
{
"name": "show",
"description": "One entry, its template, settings and fill.",
"callers": "any caller whose role grants it",
"callers": [
"invokers"
],
"input": {
"$ref": "#/defs/Named"
},
@@ -53,7 +57,9 @@
{
"name": "check",
"description": "Compare what the bus holds with what was asked, entry by entry; a difference that only grows is said as such.",
"callers": "any caller whose role grants it",
"callers": [
"invokers"
],
"input": {
"type": "object",
"properties": {
@@ -109,7 +115,9 @@
{
"name": "orphans",
"description": "Entries the bus holds that no manifest asks for; never one whose manifest the judge refused or outgrew, nor one of the foundation's old sections.",
"callers": "any caller whose role grants it",
"callers": [
"invokers"
],
"input": {
"type": "object",
"properties": {},
@@ -135,43 +143,54 @@
{
"name": "create",
"description": "Create one entry now.",
"callers": "the bus module's own process only",
"callers": [
"module:nats"
],
"input": {
"$ref": "#/defs/Entry"
},
"answer": {
"$ref": "#/defs/Held"
},
"optional": true
"optional": true,
"class": "act"
},
{
"name": "apply",
"description": "Apply a difference that only grows: a larger cap, a longer age.",
"callers": "the bus module's own process only",
"callers": [
"module:nats"
],
"input": {
"$ref": "#/defs/Named"
},
"answer": {
"$ref": "#/defs/Held"
},
"optional": true
"optional": true,
"class": "act"
},
{
"name": "recreate",
"description": "Rebuild an entry whose settings differ in a way that cannot grow, from its data where the storage type allows, after a stream snapshot.",
"callers": "the bus module's process, on the operator's warrant",
"callers": [
"module:nats"
],
"input": {
"$ref": "#/defs/Warranted"
},
"answer": {
"$ref": "#/defs/Held"
},
"optional": true
"optional": true,
"class": "warrant"
},
{
"name": "drop",
"description": "Remove one orphan, after a stream snapshot.",
"callers": "the bus module's process, on the operator's warrant",
"callers": [
"module:nats"
],
"input": {
"$ref": "#/defs/Warranted"
},
@@ -191,7 +210,152 @@
"dropped"
]
},
"optional": true
"optional": true,
"class": "warrant"
},
{
"name": "snapshot-kept",
"description": "Take the restore point of one module's kept data on the bus: the data whole and the position of each durable consumer the module reads with, keyed by the module, the kept data, its form and the fingerprint it is taken before (design 47 *A module's kept data on the bus*).",
"callers": [
"holder:node-backup@same-node"
],
"input": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module",
"minLength": 1
},
"kept": {
"type": "string",
"description": "the kept data, its local name in the module's manifest",
"minLength": 1
},
"form": {
"type": "integer",
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint the restore point is taken before",
"minLength": 1
},
"why": {
"type": "string",
"description": "why it is taken"
},
"catch-up": {
"type": "object",
"description": "the catch-up tool the newer manifest declares beside the kept data and its arguments whole, recorded in the restore point (design 47 G 299, 406)",
"properties": {
"tool": {
"type": "string"
},
"arguments": {
"type": "object"
}
},
"required": [
"tool"
]
}
},
"required": [
"module",
"kept",
"form",
"fingerprint"
],
"additionalProperties": false
},
"answer": {
"type": "object",
"properties": {
"point": {
"$ref": "#/defs/KeptPoint"
},
"error": {
"type": "string",
"description": "why it failed; set alone"
}
},
"description": "the restore point taken, or the error"
},
"class": "act"
},
{
"name": "restore-kept",
"description": "Restore one module's kept data from its restore point beside the live data, never over it: the live data is set aside under a name of its own and the consumers' positions are set back with it. With aside-only it sets the live data aside and restores nothing; with discard-aside, naming data set aside, it removes that data and restores nothing (design 47 G 405).",
"callers": [
"holder:node-backup@same-node"
],
"input": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module",
"minLength": 1
},
"kept": {
"type": "string",
"description": "the kept data, its local name in the module's manifest",
"minLength": 1
},
"form": {
"type": "integer",
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint the restore point is taken before",
"minLength": 1
},
"snapshot": {
"type": "string",
"description": "the restore point's name; not with aside-only or discard-aside",
"minLength": 1
},
"why": {
"type": "string",
"description": "why"
},
"aside-only": {
"type": "boolean",
"description": "set the live data aside and restore nothing"
},
"discard-aside": {
"type": "string",
"description": "the name of data set aside: remove it and restore nothing"
}
},
"required": [
"module",
"kept",
"form",
"fingerprint"
],
"additionalProperties": false
},
"answer": {
"type": "object",
"properties": {
"restored": {
"type": "boolean",
"description": "the restore point is the live data now"
},
"aside": {
"$ref": "#/defs/Aside"
},
"error": {
"type": "string",
"description": "why it failed; set alone"
}
},
"description": "what was restored and what was set aside, or the error"
},
"class": "act"
}
],
"events": [
@@ -558,6 +722,10 @@
"type": "string"
},
"description": "its subjects, for a stream"
},
"objects": {
"type": "string",
"description": "the bus name of the state's <state>-objects, where its large values go (design 47 G 58, 399)"
}
},
"required": [
@@ -565,6 +733,133 @@
"storage-type"
],
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7)"
},
"KeptPoint": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module",
"minLength": 1
},
"kept": {
"type": "string",
"description": "the kept data, its local name in the module's manifest",
"minLength": 1
},
"form": {
"type": "integer",
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint the restore point is taken before",
"minLength": 1
},
"snapshot": {
"type": "string",
"description": "the restore point's name"
},
"consumers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stream": {
"type": "string",
"description": "the stream"
},
"consumer": {
"type": "string",
"description": "the durable consumer"
},
"sequence": {
"type": "integer",
"description": "its acknowledged position"
}
},
"required": [
"stream",
"consumer",
"sequence"
]
},
"description": "each durable consumer the module reads with, and its position"
},
"size": {
"type": "integer",
"description": "its size in bytes"
},
"at": {
"type": "string",
"description": "when it was taken",
"format": "date-time"
},
"catch-up": {
"type": "object",
"description": "the catch-up tool and its arguments the restore point records (design 47 G 406)",
"properties": {
"tool": {
"type": "string"
},
"arguments": {
"type": "object"
}
},
"required": [
"tool"
]
}
},
"required": [
"module",
"kept",
"form",
"fingerprint",
"snapshot"
],
"description": "a restore point of one module's kept data on the bus, whole, with its consumers' positions"
},
"Aside": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "its id, for discard-aside"
},
"module": {
"type": "string",
"description": "the module"
},
"kept": {
"type": "string",
"description": "the kept data"
},
"form": {
"type": "integer",
"description": "the form it held"
},
"name": {
"type": "string",
"description": "the name it is kept under on the bus"
},
"size": {
"type": "integer",
"description": "its size in bytes"
},
"at": {
"type": "string",
"description": "when it was set aside",
"format": "date-time"
}
},
"required": [
"id",
"module",
"kept",
"name"
],
"description": "live kept data a restore set aside, never removed but by discard-aside"
}
}
}
@@ -64,7 +64,9 @@
}
}
},
"callers": "any caller whose role grants it; the checker asks it",
"callers": [
"invokers"
],
"answer": {
"type": "object",
"properties": {
@@ -8,7 +8,7 @@
"verbs": [
{
"name": "backed-up",
"description": "What this machine backs up: each module, what it declared, its last good night, how many restore points are kept and the repository's size.",
"description": "What this machine backs up: each module, what it declared, its last good night, how many restore points are kept and the repository's size. Also each module's restore points of its kept data on the bus (the kept data, the form, the fingerprint each was taken before) and the data set aside at each restore, with its size.",
"replaces": [
"restic snapshots"
],
@@ -24,7 +24,7 @@
},
{
"name": "now",
"description": "Take a backup now, of one module or of every module on this machine — before a migration, a retirement or anything else that could go wrong.",
"description": "Take a backup now, of one module or of every module on this machine — before a migration, a retirement or anything else that could go wrong. With kept, a restore point of one kept data on the bus instead, said by the event ended.",
"replaces": [
"restic backup"
],
@@ -33,14 +33,42 @@
"module": {
"description": "one module (optional)",
"type": "string"
},
"kept": {
"type": "string",
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
},
"form": {
"type": "integer",
"description": "with kept: its form now"
},
"fingerprint": {
"type": "string",
"description": "with kept: the fingerprint the restore point is taken before"
},
"catch-up": {
"type": "object",
"description": "with kept: the catch-up tool the newer manifest declares beside it and its arguments whole, recorded in the restore point (design 47 G 299, 406)",
"properties": {
"tool": {
"type": "string"
},
"arguments": {
"type": "object"
}
},
"required": [
"tool"
]
}
},
"type": "object"
}
},
"class": "act"
},
{
"name": "restore",
"description": "Restore one module's data from a restore point BESIDE the live data, never over it: each directory as \u003cpath\u003e.restored-\u003cdate\u003e. Swapping it in is a person's act. Lists the restore points when none is named.",
"description": "Restore one module's data from a restore point BESIDE the live data, never over it: each directory as <path>.restored-<date>. Swapping it in is a person's act. Lists the restore points when none is named. With kept, the restore point of one kept data on the bus by its module, kept data and form, the live data set aside and never removed, said by the event restored.",
"replaces": [
"restic restore"
],
@@ -57,13 +85,96 @@
"snapshot": {
"description": "the restore point (from `backed-up`; the newest when omitted)",
"type": "string"
},
"kept": {
"type": "string",
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
},
"form": {
"type": "integer",
"description": "with kept: its form now"
},
"fingerprint": {
"type": "string",
"description": "with kept: the fingerprint the restore point is taken before"
}
},
"required": [
"module"
],
"type": "object"
},
"class": "act"
},
{
"name": "aside",
"description": "Set one module's live kept data on the bus aside under a name of its own and restore nothing, after the node agent stopped the newer build (design 47 G 297, 405); the data set aside is listed by backed-up and removed only by discard-aside.",
"class": "act",
"input": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module"
},
"kept": {
"type": "string",
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
},
"form": {
"type": "integer",
"description": "with kept: its form now"
},
"fingerprint": {
"type": "string",
"description": "with kept: the fingerprint the restore point is taken before"
}
},
"required": [
"module",
"kept",
"form",
"fingerprint"
]
},
"answer": {
"type": "object",
"properties": {
"aside": {
"type": "string",
"description": "the name the live data is set aside under"
},
"error": {
"type": "string",
"description": "why it failed; set alone"
}
}
}
},
{
"name": "discard-aside",
"description": "Remove data a restore set aside, on a person's call alone; writes the act, who and why in the hand-act log of the seat mesh-hand-acts.",
"callers": [
"operator"
],
"input": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "the aside's id, as backed-up lists it"
},
"why": {
"type": "string",
"description": "why"
}
},
"required": [
"id",
"why"
]
},
"class": "act"
}
],
"receives": [
@@ -77,5 +188,103 @@
"comment": "#",
"dirs": true
}
],
"events": [
{
"name": "ended",
"subject": "ended.<node>.<module>.<kept>",
"body": {
"type": "object",
"description": "a restore point of a kept data on the bus taken, done or failed",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"module": {
"type": "string",
"description": "the module"
},
"kept": {
"type": "string",
"description": "the kept data"
},
"form": {
"type": "integer",
"description": "its form"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint"
},
"outcome": {
"enum": [
"done",
"failed"
]
},
"error": {
"type": "string",
"description": "why it failed"
}
},
"required": [
"v",
"module",
"kept",
"form",
"fingerprint",
"outcome"
]
}
},
{
"name": "restored",
"subject": "restored.<node>.<module>.<kept>",
"body": {
"type": "object",
"description": "a kept data on the bus restored from its restore point beside the live data, done or failed",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"module": {
"type": "string",
"description": "the module"
},
"kept": {
"type": "string",
"description": "the kept data"
},
"form": {
"type": "integer",
"description": "its form"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint"
},
"outcome": {
"enum": [
"done",
"failed"
]
},
"error": {
"type": "string",
"description": "why it failed"
}
},
"required": [
"v",
"module",
"kept",
"form",
"fingerprint",
"outcome"
]
}
}
]
}
@@ -5,8 +5,14 @@
"grain": "whole",
"domain": "Core",
"decision": "novox/hq ADR 0563",
"description": "The node seat every node's engine holds (novox/hq ADR 0563, ADR 0618 §3, §4): its hand acts on the operator's warrant, its read-only judgements, its compositions and what it reads of a manifest. Each verb is answered on this node's subject, mesh.seat.node-engine.tool.<verb>.<node>, and each event is published on mesh.seat.node-engine.event.<event>.<node>, the node's name its last token.",
"description": "The node seat every node's engine holds (novox/hq ADR 0563, ADR 0618 §3, §4): its hand acts on the operator's warrant, its read-only judgements, its compositions and what it reads of a manifest. Each verb is answered on this node's subject, mesh.seat.node-engine.tool.<verb>.<node>, and each event is published on mesh.seat.node-engine.event.<event>.<node>, the node's name its last token, or, for an event whose subject names <node>, there (composed.<node>, running.<node>.<module>): the grants part grants a node's account only its own node's subjects (ADR 0363 §2).",
"held-by-the-engine": true,
"acts": [
{
"step": "compose",
"on": "every"
}
],
"verbs": [
{
"name": "hand-over",
@@ -29,7 +35,8 @@
},
"answer": {
"$ref": "#/defs/Asked"
}
},
"class": "warrant"
},
{
"name": "access-act",
@@ -57,7 +64,8 @@
},
"answer": {
"$ref": "#/defs/Asked"
}
},
"class": "warrant"
},
{
"name": "judge-directories",
@@ -68,7 +76,8 @@
},
"answer": {
"$ref": "#/defs/Said"
}
},
"class": "read"
},
{
"name": "setuid-search",
@@ -84,7 +93,8 @@
},
"answer": {
"$ref": "#/defs/Said"
}
},
"class": "read"
},
{
"name": "root-free",
@@ -107,7 +117,8 @@
"required": [
"machines"
]
}
},
"class": "read"
},
{
"name": "acts",
@@ -127,7 +138,8 @@
},
"answer": {
"$ref": "#/defs/Acts"
}
},
"class": "read"
},
{
"name": "packages",
@@ -217,7 +229,8 @@
"node",
"source"
]
}
},
"class": "read"
},
{
"name": "composition",
@@ -491,7 +504,8 @@
"composition",
"judged"
]
}
},
"class": "read"
},
{
"name": "compose",
@@ -554,7 +568,8 @@
"required": [
"pass"
]
}
},
"class": "act"
},
{
"name": "compose-candidate",
@@ -633,7 +648,8 @@
"own",
"took"
]
}
},
"class": "read"
},
{
"name": "manifest-reads",
@@ -673,12 +689,17 @@
"stated-at"
],
"description": "what this machine's engine reads of a manifest (ADR 0618 §3)"
}
},
"class": "read"
},
{
"name": "seat-list",
"description": "The seat list this engine holds and what it waits for (novox/hq ADR 0636 §7): each seat's source (trunk or bootstrap) and digest, the seats held from the bootstrap alone, the definitions refused, the last error and whether the seat mesh-catalog has answered. Read-only.",
"callers": "the operator and the healers",
"callers": [
"persons",
"sessions",
"healers"
],
"input": {
"type": "object",
"properties": {}
@@ -690,7 +711,11 @@
{
"name": "seat-list-again",
"description": "Make this engine read the seat list from the seat mesh-catalog now (novox/hq ADR 0636 §7), the recovery of a list unread; it answers what it holds afterwards, and the error when the read failed. A read that changed nothing still ends the engine's wait.",
"callers": "the operator and the healers",
"callers": [
"persons",
"sessions",
"healers"
],
"input": {
"type": "object",
"properties": {}
@@ -698,6 +723,29 @@
"answer": {
"$ref": "#/defs/SeatList"
}
},
{
"name": "process-builds",
"description": "The build each process on this node was started with (design 47 *The revision view*): per service and container the fingerprint the node-engine handed it in MESH_FINGERPRINT, or why it is unknown, and when it started. Narrowed by module. Reads only.",
"callers": [
"persons",
"sessions",
"healers"
],
"input": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "only this module's processes"
}
},
"additionalProperties": false
},
"answer": {
"$ref": "#/defs/ProcessBuilds"
},
"class": "read"
}
],
"events": [
@@ -728,6 +776,31 @@
"body": {
"$ref": "#/defs/ManifestReadsChanged"
}
},
{
"name": "composed",
"subject": "composed.<node>",
"body": {
"$ref": "#/defs/Composed"
}
},
{
"name": "running",
"subject": "running.<node>.<module>",
"keep": {
"max-age-days": 0,
"last-per-subject": true
},
"body": {
"$ref": "#/defs/Running"
}
},
{
"name": "capabilities-changed",
"subject": "capabilities-changed.<node>",
"body": {
"$ref": "#/defs/CapabilitiesChanged"
}
}
],
"family": {
@@ -2658,6 +2731,183 @@
"state",
"since"
]
},
"Composed": {
"type": "object",
"description": "an entry composed on a node (design 47 *What each step says*)",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"module": {
"type": "string",
"description": "the module"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint of the want composed"
},
"digest": {
"type": "string",
"description": "the digest of the composition (design 47 G 404)"
},
"at": {
"type": "string",
"description": "when, RFC 3339",
"format": "date-time"
}
},
"required": [
"v",
"node",
"module",
"fingerprint",
"digest",
"at"
]
},
"Running": {
"type": "object",
"description": "a module running healthy on a node at a build: what the node-engines of other nodes and the grants part decide a seat's pass from (ADR 0660 §2), kept last per subject with no age limit",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"module": {
"type": "string",
"description": "the module"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint of the build it runs; none with stopped"
},
"manifest": {
"type": "string",
"description": "the digest of that build's manifest, the indexer's manifest of it, read by digest from the catalog half"
},
"at": {
"type": "string",
"description": "when it was seen running healthy, RFC 3339",
"format": "date-time"
},
"stopped": {
"type": "boolean",
"description": "true when the module no longer runs on the node: no fingerprint or manifest then (design 47 G 365, 404); mesh-sdk's SeatsToPassOn counts such a module as not running there"
}
},
"required": [
"v",
"node",
"module",
"at"
]
},
"CapabilitiesChanged": {
"type": "object",
"description": "a node's capabilities changed, which the assigner places by",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"capabilities": {
"type": "array",
"items": {
"type": "string"
},
"description": "its capabilities now"
},
"at": {
"type": "string",
"description": "when, RFC 3339",
"format": "date-time"
}
},
"required": [
"v",
"node",
"capabilities",
"at"
]
},
"ProcessBuild": {
"type": "object",
"description": "the build one process of a module was started with",
"properties": {
"module": {
"type": "string",
"description": "the module"
},
"process": {
"type": "string",
"description": "the service's unit or the container's name"
},
"kind": {
"type": "string",
"description": "service or container",
"enum": [
"service",
"container"
]
},
"fingerprint": {
"type": "string",
"description": "the fingerprint handed to it in MESH_FINGERPRINT; empty when it was started without one"
},
"unknown": {
"type": "string",
"description": "why its build is unknown: started before the node-engine handed MESH_FINGERPRINT, or the value could not be read"
},
"started": {
"type": "string",
"description": "when it was started, RFC 3339",
"format": "date-time"
}
},
"required": [
"module",
"process",
"kind"
]
},
"ProcessBuilds": {
"type": "object",
"description": "what process-builds answers",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"processes": {
"type": "array",
"items": {
"$ref": "#/defs/ProcessBuild"
},
"description": "every process the node-engine started, by module"
},
"error": {
"type": "string",
"description": "why they could not be read"
}
},
"required": [
"node",
"processes"
]
}
}
}
File diff suppressed because it is too large Load Diff
@@ -176,7 +176,79 @@
}
}
],
"description": "The merge check's tries: start one, read one, end one. The checker's own events stay under its own subjects (ADR 0620 §2).",
"description": "The merge check's tries: start one, read one, end one. The seat says each check's end as checked and what the checker owes the forge as owed; the checker's other events stay under its own subjects (ADR 0620 \u00a72).",
"family": {
"name": "mesh-delivery-checker.events",
"max-age-days": 7
},
"events": [
{
"name": "checked",
"body": {
"type": "object",
"description": "a candidate checked: its entries judged at the group's heads (design 47 *What each step says*)",
"properties": {
"group": {
"type": "string",
"description": "the group, its branch"
},
"heads": {
"type": "string",
"description": "the heads checked, 12 hex digits, as the candidate's revisions are keyed"
},
"source": {
"type": "integer",
"description": "the source revision the heads are merged onto"
},
"catalog": {
"type": "integer",
"description": "the candidate's catalog graph revision judged, by its number on the seat mesh-catalog"
},
"verdict": {
"type": "string",
"enum": [
"pass",
"fail",
"could not run"
],
"description": "pass, fail, or could not run when a part the check needs did not answer"
},
"words": {
"type": "string",
"description": "what failed first, or the part not heard"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/defs/CheckedEntry"
},
"description": "the entries checked"
},
"at": {
"type": "string",
"format": "date-time",
"description": "when"
}
},
"required": [
"group",
"heads",
"verdict"
]
}
},
{
"name": "owed",
"subject": "owed.<repository>.<number>",
"body": {
"$ref": "#/defs/Owed"
},
"keep": {
"max-age-days": 7,
"max-mib": 64
}
}
],
"holder-events": [
{
"name": "verdict",
@@ -746,5 +818,90 @@
"description": "the previews of a head merged onto a trunk",
"history": 5
}
]
],
"defs": {
"Owed": {
"type": "object",
"description": "the status the checker owes the forge for a head, said under its id and safe to repeat (a status replaces what stands); the forge bridge performs it through the seat git's verb status (design 47 *What the gate owes the forge*)",
"properties": {
"id": {
"type": "string",
"description": "the act's id, the same each time it is said again"
},
"act": {
"type": "string",
"enum": [
"status"
],
"description": "the act: always status"
},
"repository": {
"type": "string",
"description": "the repository, <owner>/<name>",
"minLength": 1
},
"number": {
"type": "integer",
"description": "the pull request's number"
},
"head": {
"type": "string",
"description": "the pull request's head the status is on",
"pattern": "^[0-9a-f]{40}$"
},
"context": {
"type": "string",
"description": "its context, mesh/check"
},
"state": {
"type": "string",
"description": "pending, success, failure or error"
},
"description": {
"type": "string",
"description": "what it says"
},
"target": {
"type": "string",
"description": "the page it links to"
},
"said": {
"type": "string",
"format": "date-time",
"description": "when the checker first said it"
}
},
"required": [
"id",
"act",
"repository",
"number",
"head",
"context",
"state"
]
},
"CheckedEntry": {
"type": "object",
"description": "one entry of the candidate checked: a module at its fingerprint",
"properties": {
"module": {
"type": "string",
"description": "the module"
},
"fp": {
"type": "string",
"description": "the entry's fingerprint"
},
"node": {
"type": "string",
"description": "the node it was composed for, when the check composed it on one"
}
},
"required": [
"module",
"fp"
]
}
}
}