pacman reads the node-engine's packages as mesh-host.packages, the bucket each engine writes (ADR 0565 clause 6, issue 1953)

The read node-engine.packages named a bucket node-engine_packages that nothing writes:
the engine's manifest is mesh-host's, so its state is mesh-host_packages, read as
disk-load reads mesh-host.data. The view still names which source answered, the
engine's key or the controller's mirror.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-01 16:09:50 +01:00
parent f06335cf7e
commit 37613ec6a9
5 changed files with 9 additions and 6 deletions
@@ -102,7 +102,7 @@ func TestTheKeeperPutsTheNodesPackagesOnARealBusAndAnotherInstanceReadsThem(t *t
}
buckets[name] = kv
}
declared, err := js.CreateKeyValue(ctx, jetstream.KeyValueConfig{Bucket: "node-engine_packages"})
declared, err := js.CreateKeyValue(ctx, jetstream.KeyValueConfig{Bucket: "mesh-host_packages"})
if err != nil {
t.Fatal(err)
}
@@ -14,6 +14,8 @@ import (
"reflect"
"strings"
"testing"
"git.novox.be/novox/mesh-sdk/go/delivery"
)
// rawManifest is the manifest as written, every field kept.
@@ -133,7 +135,7 @@ func TestTheKeeperDeclaresTheModulesStatesAndEvents(t *testing.T) {
}
// The verbs read which packages each node's modules declare; the process reads no other module's state
// (ADR 0507 §5, ADR 0436 §1).
if got := strs(raw["reads"]); !reflect.DeepEqual(got, []string{"node-engine.packages", "mesh-controller.declared-packages"}) {
if got := strs(raw["reads"]); !reflect.DeepEqual(got, []string{delivery.EnginePackagesRead, "mesh-controller.declared-packages"}) {
t.Errorf("reads: %v", got)
}
}
+3 -2
View File
@@ -24,9 +24,10 @@ const DeclaredPackagesState = SourceEngine
// whose engine has written no key yet, until the controller's lease is written away (ADR 0565 clause 6).
const ControllerDeclaredState = "mesh-controller.declared-packages"
// The sources a node's declaration is read from, said in the answer.
// The sources a node's declaration is read from, said in the answer: the node-engine's state, read by its manifest's
// name (mesh-host.packages, its bucket mesh-host_packages; mesh-sdk delivery.EnginePackagesRead), and the mirror.
const (
SourceEngine = "node-engine.packages"
SourceEngine = delivery.EnginePackagesRead
SourceController = "mesh-controller.declared-packages"
)