Merge origin/main (#5): mesh-broker's Binding is the wire form; restore-kept and snapshot-kept taken out, the binding names its objects

The conflicts in mesh-broker's seat.json and fixtures took origin/main's Binding (list, show and orphans answer each
binding) and the objects field of C8; C8's snapshot-kept, restore-kept, KeptPoint and Aside are not carried over as G
section 555 moves them to the seat mesh-recovery, which mesh-broker does not gain. The generated Go and TypeScript of
mesh-broker are written again by seatgen.

Builds: design 47 G §399, §513, §555

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 14:40:11 +01:00
7 changed files with 222 additions and 577 deletions
+56
View File
@@ -22,6 +22,62 @@
}
}
},
{
"name": "created with a ledger's binding as the bus module writes it",
"of": "event:created",
"subject": "mesh.seat.mesh-broker.event.created",
"given": {
"module": "mesh-knowledge",
"local-name": "ledger",
"storage-type": "ledger",
"template": "ledger",
"bus-name": "mesh-knowledge_ledger",
"binding": {
"local": "ledger",
"storage": "ledger",
"template": "ledger",
"subject": "mesh.ledger.mesh-knowledge.ledger.history",
"history": "mesh-knowledge_ledger",
"state": "mesh-knowledge_ledger_state",
"indexes": {
"by-kind": "mesh-knowledge_ledger_index-by-kind"
},
"snapshot": "mesh.ledger.mesh-knowledge.ledger.snapshot",
"types": [
{
"name": "decision",
"schema": {
"title": {
"type": "string"
},
"kind": {
"type": "string"
}
},
"operations": [
{
"name": "set",
"effect": "set-fields",
"fields": [
"title",
"kind"
]
}
],
"indexes": [
{
"name": "by-kind",
"on": [
"kind"
]
}
]
}
]
},
"revision": 7
}
},
{
"name": "refused on the seat's subject",
"of": "event:refused",
+62 -40
View File
@@ -49,48 +49,70 @@
}
},
{
"name": "snapshot-kept answers the restore point",
"of": "verb:snapshot-kept.answer",
"name": "list answers the binding of an entry the bus holds",
"of": "verb:list.answer",
"given": {
"point": {
"module": "mesh-delivery-indexer",
"kept": "catalog-revisions",
"form": 1,
"fingerprint": "src2:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"snapshot": "kept-mesh-delivery-indexer-catalog-revisions-1-aaaa",
"consumers": [
{
"stream": "forge",
"consumer": "novox_mesh-delivery-indexer",
"sequence": 4711
"entries": [
{
"module": "mesh-knowledge",
"local-name": "ledger",
"storage-type": "ledger",
"template": "ledger",
"bus-name": "mesh-knowledge_ledger",
"settings": {
"max-mib": 64
},
"fill": {
"count": 10,
"bytes": 2048,
"cap": 67108864
},
"binding": {
"local": "ledger",
"storage": "ledger",
"template": "ledger",
"subject": "mesh.ledger.mesh-knowledge.ledger.history",
"history": "mesh-knowledge_ledger",
"state": "mesh-knowledge_ledger_state",
"objects": "mesh-knowledge_ledger_state-objects",
"indexes": {
"by-kind": "mesh-knowledge_ledger_index-by-kind"
},
"snapshot": "mesh.ledger.mesh-knowledge.ledger.snapshot",
"types": [
{
"name": "decision",
"schema": {
"title": {
"type": "string"
},
"kind": {
"type": "string"
}
},
"operations": [
{
"name": "set",
"effect": "set-fields",
"fields": [
"title",
"kind"
]
}
],
"indexes": [
{
"name": "by-kind",
"on": [
"kind"
]
}
]
}
]
}
],
"size": 1048576,
"at": "2026-11-09T20:00:00Z"
}
}
},
{
"name": "snapshot-kept answers an error",
"of": "verb:snapshot-kept.answer",
"given": {
"error": "the object store catalog-revisions is not on the bus"
}
},
{
"name": "restore-kept answers what it set aside",
"of": "verb:restore-kept.answer",
"given": {
"restored": true,
"aside": {
"id": "aside-1",
"module": "mesh-delivery-indexer",
"kept": "catalog-revisions",
"form": 2,
"name": "catalog-revisions-aside-20261109",
"size": 2097152,
"at": "2026-11-09T21:00:00Z"
}
}
]
}
}
]
+41 -273
View File
@@ -212,150 +212,6 @@
},
"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": [
@@ -567,6 +423,10 @@
"why": {
"type": "string",
"description": "why it is in its state, in plain words; empty when held as asked"
},
"binding": {
"$ref": "#/defs/Binding",
"description": "the binding a module receives for the entry, as created and recreated carry it; present on an entry whose objects the bus holds, absent on one it does not (design 25 bindings-first-view §2)"
}
},
"required": [
@@ -704,162 +564,70 @@
"Binding": {
"type": "object",
"properties": {
"bus-name": {
"local": {
"type": "string",
"description": "the entry's name on the bus"
"description": "the entry's local name in the module's manifest"
},
"storage-type": {
"storage": {
"type": "string",
"description": "how the bus keeps it"
"description": "how the bus keeps it: the entry's storage type"
},
"template": {
"type": "string",
"description": "its template"
},
"subjects": {
"type": "array",
"items": {
"type": "string"
},
"description": "its subjects, for a stream"
"stream": {
"type": "string",
"description": "a stream's name on the bus"
},
"subject": {
"type": "string",
"description": "the subject a stream's messages are on; also a ledger's history's"
},
"bucket": {
"type": "string",
"description": "a key-value bucket's name"
},
"object-store": {
"type": "string",
"description": "an object store's name"
},
"objects": {
"type": "string",
"description": "the bus name of the state's <state>-objects, where its large values go (design 47 G 58, 399)"
}
},
"required": [
"bus-name",
"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": {
"history": {
"type": "string",
"description": "the kept data, its local name in the module's manifest",
"minLength": 1
"description": "a ledger's history stream"
},
"form": {
"type": "integer",
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
},
"fingerprint": {
"state": {
"type": "string",
"description": "the fingerprint the restore point is taken before",
"minLength": 1
"description": "a ledger's state bucket"
},
"indexes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "a ledger's index buckets, by index name"
},
"snapshot": {
"type": "string",
"description": "the restore point's name"
"description": "the subject of a ledger's instances' snapshots"
},
"consumers": {
"types": {
"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"
]
"type": "object"
},
"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"
]
"description": "a ledger's types, as its manifest declares them"
}
},
"required": [
"module",
"kept",
"form",
"fingerprint",
"snapshot"
"local",
"storage"
],
"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"
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7): the names on the bus of the entry's objects, one form in the events, in list, show and orphans, and in the membership"
}
}
}