delivery, catalogue: the node-engine's compose-candidate verb, compositions carrying their plan or refusal, the kept import form and a build's imports on its key, so the engine alone composes and the indexer switches form without a rebuild (ADR 0593 §4, §6, §7)

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 18:19:24 +01:00
parent 04d951d9da
commit 346dd43228
7 changed files with 373 additions and 4 deletions
+17 -2
View File
@@ -8,8 +8,8 @@ import (
)
// The compositions (novox/hq ADR 0539 clauses 1 to 4). A **composition** is one module's resources composed for one node
// at one fingerprint: a node composes its own (ADR 0547 §2), and the ended controller wrote them into a bucket of each
// node, `composed-<node>`, which nothing writes since it ended (ADR 0590), under `<node>.<module>.<fingerprint hex>`, and
// at one fingerprint: a node composes its own (ADR 0547 §2) and writes each it makes into its node's bucket,
// `composed-<node>` (ADR 0593 §6), under `<node>.<module>.<fingerprint hex>`, and
// the node's own resources (adoption, firewall openings, accounts, the resolver, identities and groups) under
// `<node>.node`. A composition's digest and its judgement of the move from the composition the node runs now is
// ComposedDigest.
@@ -23,6 +23,21 @@ const (
ComposedKeep = 5
)
// Who writes and who reads a node's compositions (novox/hq ADR 0593 §6): the node's engine alone writes its node's
// bucket, unsigned, a record for readers that no engine applies; the grants part creates each bucket, create-only, and
// grants the readers read-only on every node's bucket. A reader declares ComposedRead in its manifest's `reads`, and the
// engine's manifest announces the state ComposedState so that name resolves.
const (
// ComposedState is the local name the node-engine's manifest announces for the compositions of every node.
ComposedState = "composed"
// ComposedRead is the `reads` entry naming it: the node-engine's module and ComposedState.
ComposedRead = "mesh-host." + ComposedState
)
// ComposedReaders are the modules that may read every node's compositions (ADR 0593 §6, §8): the provisioner makes its
// plans from them, the assigner compares them for mesh-wants.upgrade, and the view shows them.
var ComposedReaders = []string{"mesh-delivery-assigner", "mesh-delivery-view", "mesh-provisioner"}
// nodeWord is the last part of a node's own key, in the have bucket and in a node's composition bucket alike.
const nodeWord = "node"