The node-engine seat's read verb converged (ADR 0683, design 33 control-verbs §10)

The holder of node-packet-filter refuses allow and disallow on an adopted node
and never assumes converged, so it asks the node-engine the node's convergence
state: adopted or converged, since when, and the found firewall's kind when
adopted. The composition answer gains withheld-parts, each part a compose kept
because its read did not answer, with why: the filter's node-packet-filter.allowed.
Packages generated again by seatgen (seatgen -check clean).

Builds: design 33 control-verbs §10; design 08 control-verbs §4; ADR 0683; H-A-316, H-A-321
This commit is contained in:
2026-11-21 21:02:53 +01:00
parent 87eab81be1
commit efcef83cf4
6 changed files with 181 additions and 25 deletions
+6
View File
@@ -129,6 +129,12 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v CompositionAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "apply-order answers the changed wants in the order they are applied, with why and what each waits on", subject: "", given: "{\"order\":[{\"module\":\"mesh-broker\",\"position\":1,\"waits\":[],\"why\":\"the bus module is applied first\"},{\"module\":\"mesh-delivery-view\",\"pipeline\":\"main.2\",\"position\":2,\"rank\":2,\"waits\":[\"mesh-delivery-indexer\"],\"why\":\"rank 2 of main.2, after rank 1\"}]}", wire: "{\"order\":[{\"module\":\"mesh-broker\",\"position\":1,\"waits\":[],\"why\":\"the bus module is applied first\"},{\"module\":\"mesh-delivery-view\",\"pipeline\":\"main.2\",\"position\":2,\"rank\":2,\"waits\":[\"mesh-delivery-indexer\"],\"why\":\"rank 2 of main.2, after rank 1\"}]}",
decode: func(b []byte) (any, error) { var v ApplyOrderAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "converged answers an adopted node with its found firewall", subject: "", given: "{\"found\":\"ufw\",\"since\":\"2026-10-02T09:00:00Z\",\"state\":\"adopted\"}", wire: "{\"found\":\"ufw\",\"since\":\"2026-10-02T09:00:00Z\",\"state\":\"adopted\"}",
decode: func(b []byte) (any, error) { var v ConvergedAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "converged answers a converged node since it converged", subject: "", given: "{\"since\":\"2026-11-21T19:00:00Z\",\"state\":\"converged\"}", wire: "{\"since\":\"2026-11-21T19:00:00Z\",\"state\":\"converged\"}",
decode: func(b []byte) (any, error) { var v ConvergedAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "composition names the filter part kept because allowed did not answer", subject: "", given: "{\"composition\":{\"key\":\"\"},\"judged\":{\"judgement\":\"\",\"waits_for_yes\":false,\"words\":\"\"},\"module\":\"nftables\",\"node\":\"desk\",\"started\":true,\"withheld-parts\":[{\"part\":\"node-packet-filter.allowed\",\"why\":\"asked of the seat node-packet-filter's verb allowed on desk, which did not answer within 10s\"}]}", wire: "{\"composition\":{\"key\":\"\"},\"judged\":{\"judgement\":\"\",\"waits_for_yes\":false,\"words\":\"\"},\"module\":\"nftables\",\"node\":\"desk\",\"started\":true,\"withheld-parts\":[{\"part\":\"node-packet-filter.allowed\",\"why\":\"asked of the seat node-packet-filter's verb allowed on desk, which did not answer within 10s\"}]}",
decode: func(b []byte) (any, error) { var v CompositionAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
}
for _, c := range cases {
v, err := c.decode([]byte(c.given))