C8: mesh-broker takes and restores a module's kept data (snapshot-kept, restore-kept) and a binding names its objects
Both verbs are of class act, not optional, and called by holder:node-backup@same-node alone; restore-kept takes aside-only and discard-aside; the Binding gains objects. The verbs' sibling mesh-broker callers text (create, apply, recreate, drop) is left as it is: a question is open. Builds: design 47 G §58, §59, §337, §399, §400, §405, §406 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -47,5 +47,50 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "snapshot-kept answers the restore point",
|
||||
"of": "verb:snapshot-kept.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
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -200,6 +200,150 @@
|
||||
]
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"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": [
|
||||
@@ -566,6 +710,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": [
|
||||
@@ -573,6 +721,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user