H2 composition-diff: the node-engine seat's read verb composition-diff

The node-engine serves seat verbs and has no tools bundle, so the composed
values read by resource are a read verb beside composition: given a module and
a revision or digest, the entries that differ between the running composition
and the other, per resource, environment entries by name, a secret masked.
Packages generated again by seatgen (seatgen -check clean).

Builds: design 47 H2 §813 (3); H-A-349 DQ-12b
This commit is contained in:
2026-11-21 23:04:35 +01:00
parent 1b320b2312
commit 3fbe33612f
6 changed files with 247 additions and 1 deletions
+103
View File
@@ -550,6 +550,63 @@
},
"class": "read"
},
{
"name": "composition-diff",
"description": "One module's composed values read by resource (design 47 H2 \u00a7813 (3), H-A-349 DQ-12b): given a module and a revision or a digest of its composition, the entries that differ between the composition that runs and that one, per resource, environment entries by name, a secret's value masked. Read-only. Answered by this machine's engine alone.",
"class": "read",
"input": {
"type": "object",
"required": [
"module"
],
"properties": {
"module": {
"type": "string",
"description": "the module, as placed on this machine; node for the node's own"
},
"revision": {
"type": "integer",
"description": "the revision of the module's composition key to compare with, from the revisions the bucket keeps; give it or digest"
},
"digest": {
"type": "string",
"description": "the digest (sha256:\u2026) of the composition to compare with; give it or revision"
}
}
},
"answer": {
"type": "object",
"required": [
"node",
"module",
"resources"
],
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"module": {
"type": "string",
"description": "the module"
},
"running": {
"type": "string",
"description": "the digest of the composition that runs; absent when nothing runs"
},
"other": {
"$ref": "#/defs/Revision"
},
"resources": {
"type": "array",
"description": "each resource with an entry that differs; empty when none differs",
"items": {
"$ref": "#/defs/CompositionDiffResource"
}
}
}
}
},
{
"name": "compose",
"description": "Compose this machine's modules now and say how it went, so a composition that failed, or a module held, recovers without a restart: what the pass refused or held, each with why, and when the engine composes again on its own after a seat that did not answer (a deadline, no responders: retried with a growing wait; a refusal never). With module, that module's apply is also tried again. Changes only what a pass the engine makes on its own would change.",
@@ -3398,6 +3455,52 @@
"step",
"since"
]
},
"CompositionDiffEntry": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "the entry: an environment entry by its name, else the part of the resource that differs"
},
"running": {
"type": "string",
"description": "its value in the running composition; absent where the running one lacks it or the value is a secret"
},
"other": {
"type": "string",
"description": "its value in the other composition; absent where the other lacks it or the value is a secret"
},
"masked": {
"type": "boolean",
"description": "the value is a secret, so neither value is given"
}
},
"description": "one entry that differs between the running composition and the other"
},
"CompositionDiffResource": {
"type": "object",
"required": [
"resource",
"entries"
],
"properties": {
"resource": {
"type": "string",
"description": "the resource, as the composition names it"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/defs/CompositionDiffEntry"
},
"description": "the entries of the resource that differ"
}
},
"description": "one resource with the entries of it that differ"
}
}
}