ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk carries no composition rule. The catalogue functions only the node-engine's composition reaches (Resolve, Resolution's Compose, Declaration, DataItems, LeftOut, Rules and the rest, the settings, placeholder and template refusals, the rendering helpers) are copied with their tests into internal/compose/resolution; a method of a mesh-sdk shape becomes a function taking it first. The composition calls its own copies, and the captured catalogue its tests read lives here now, shared by mesh-compose's tests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
53 lines
3.2 KiB
Go
53 lines
3.2 KiB
Go
package resolution
|
|
|
|
import (
|
|
mcat "git.novox.be/novox/mesh-sdk/go/catalogue"
|
|
)
|
|
|
|
// controlRecordsDecision is the record that made the two seats.
|
|
const controlRecordsDecision = "novox/hq ADR 0565"
|
|
|
|
// wantsVerbs are the assigner's verbs on mesh-wants (ADR 0565 clauses 7, 8, 9, 15).
|
|
func wantsVerbs() []mcat.Verb {
|
|
return []mcat.Verb{
|
|
{Name: "upgrade", Description: "Whether each module's new builds wait for a person: its policy (roll, together or record) " +
|
|
"and where it comes from (a person, the module, the bus, its irreplaceable data, the default); the bus is never " +
|
|
"rolled. With module, that one; with module, policy and why, a person's choice for it, recorded as a hand act; " +
|
|
"with policy default, the choice taken back. With compare, each node's own composition and the assigner's findings.",
|
|
Input: schema(map[string]string{
|
|
"module": "one module",
|
|
"policy": "with module: roll, together, record, or default to take a person's choice back",
|
|
"why": "with policy: why, required and kept",
|
|
"compare": "\"true\": each node's own composition, by its digest, and the assigner's findings",
|
|
}, nil, "compare")},
|
|
{Name: "bus", Description: "What a bus upgrade would do: the fingerprint of the bus module each node runs against the " +
|
|
"indexer's newest, and the last bus steps from the hand-act log and the assigner's puts of the bus. Read-only: " +
|
|
"the step itself is the put on the operator's warrant.",
|
|
Input: schema(map[string]string{}, nil)},
|
|
}
|
|
}
|
|
|
|
// handActsVerbs are mesh-hand-acts' verbs (ADR 0565 clause 10), as the controller's took them.
|
|
func handActsVerbs() []mcat.Verb {
|
|
return []mcat.Verb{
|
|
{Name: "hand-act", Description: "Record one act done by hand: what, why, its cause in a word or a condition's kind " +
|
|
"(the word a second act for the same reason uses) and the condition it addresses. Who did it is the caller the " +
|
|
"runtime proves, never said by the caller. Said as act-recorded.",
|
|
Input: schema(map[string]string{
|
|
"what": "what was done, in a line",
|
|
"why": "why it had to be done by hand",
|
|
"cause": "the cause in a word, or a condition's kind",
|
|
"condition": "the key of the condition it addressed, if any (optional)",
|
|
"verb": "the act's verb in the log: a repair when absent, `hand-act drill` for a drill, or a recorder's own",
|
|
}, []string{"what", "why"})},
|
|
{Name: "hand-acts", Description: "What was done by hand lately, over this log and the controller's: who, why and the " +
|
|
"cause of each, and the causes recorded twice within a fortnight (a healer is wanted).",
|
|
Input: schema(map[string]string{"days": "how many days back (default 14)", "cause": "only this cause",
|
|
"who": "only acts whose who contains this", "warrants": "\"true\": every warrant recorded"}, nil, "warrants")},
|
|
{Name: "warranted", Description: "Record what a module did on the operator's warrant: who chose, through which channel, " +
|
|
"with which proofs and which answer read from the router's own record of that module's ask, never from the " +
|
|
"caller; once per ask. Refused for an ask still open, ended without a choice, or not that module's.",
|
|
Input: schema(map[string]string{"asker": "the module that asked", "ask": "its ask's id"}, []string{"asker", "ask"})},
|
|
}
|
|
}
|