Merge pull request 'Leave the engine's acts out of its declared state for now, so the bus's user list is composed again (issue 774)' (#178) from fix/774-engine-acts-not-carried into main

Reviewed-on: #178
This commit was merged in pull request #178.
This commit is contained in:
2026-10-30 11:51:56 +00:00
2 changed files with 5 additions and 9 deletions
-4
View File
@@ -18,10 +18,6 @@
"restic.backed-up" "restic.backed-up"
], ],
"state": [ "state": [
{
"name": "acts",
"ttl-seconds": 7776000
},
{ {
"name": "health" "name": "health"
} }
+5 -5
View File
@@ -68,16 +68,16 @@ func TestTheManifestConsumesTheBackupEvent(t *testing.T) {
if len(m.Consumes) != 1 || m.Consumes[0] != "restic.backed-up" { if len(m.Consumes) != 1 || m.Consumes[0] != "restic.backed-up" {
t.Fatalf("consumes %v", m.Consumes) t.Fatalf("consumes %v", m.Consumes)
} }
// 774 (ADR 0563 §2, §3): the acts of the node seat and the engine's own asks are its declared state acts, the bucket // 774: the acts bucket mesh-host_acts is not declared as state for now: a declared state of a module with no account
// mesh-host_acts the grants part creates and each node's engine writes under its own keys. // of its own is carried by every node's tool runner, which would be a second writer of the engine's own keys and
// has the grants part refuse the whole user list (2026-10-30). It comes back once the runtime never carries the engine.
parsed, err := catalogue.ParseManifest(raw) parsed, err := catalogue.ParseManifest(raw)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
// 774 (the alert table): beside it the state health, one key per node, the node's own health report, kept until // 774 (the alert table): the state health, one key per node, the node's own health report, kept until
// written again (no TTL: a node that stops writing keeps its last word, which the watchman reads with its time). // written again (no TTL: a node that stops writing keeps its last word, which the watchman reads with its time).
if len(parsed.State) != 2 || parsed.State[0].Name != "acts" || parsed.State[0].TTLSeconds != 90*24*60*60 || if len(parsed.State) != 1 || parsed.State[0].Name != "health" || parsed.State[0].TTLSeconds != 0 {
parsed.State[1].Name != "health" || parsed.State[1].TTLSeconds != 0 {
t.Fatalf("the manifest declares the state %+v", parsed.State) t.Fatalf("the manifest declares the state %+v", parsed.State)
} }
} }