diff --git a/modules/pacman/README.md b/modules/pacman/README.md index d5df40c1..772c874b 100644 --- a/modules/pacman/README.md +++ b/modules/pacman/README.md @@ -30,7 +30,7 @@ that seat (ADR 0207). `package.changed`. A list over the bus's cap on a value is not written: the key keeps its last value and `.not-current` says the size and since when, which the health says too. `pacman_packages`, `pacman_updates`, `pacman_installed` and `pacman_foreign` answer every node from these states, and what no - module declares from the node-engine's `packages`, else the controller's `declared-packages` until its lease is written, without asking a machine. + module declares from the node-engine's `packages` (read as `mesh-host.packages`, the engine's manifest's name), else the controller's `declared-packages` until its lease is written, without asking a machine. - **Upgrades as runs, one node at a time (ADR 0508).** Every full upgrade and every rollback is a run in the state `runs` at `.`, written at each step and emitted as it: the package record taken and read back (`records`, kept `record-days`), the DKMS gate before the transaction (a kernel an installed DKMS module's own diff --git a/modules/pacman/cmd/pacman-tools/keeper_integration_test.go b/modules/pacman/cmd/pacman-tools/keeper_integration_test.go index d994641c..4ed30c81 100644 --- a/modules/pacman/cmd/pacman-tools/keeper_integration_test.go +++ b/modules/pacman/cmd/pacman-tools/keeper_integration_test.go @@ -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) } diff --git a/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go b/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go index 917f8096..61d4fc6a 100644 --- a/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go +++ b/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go @@ -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) } } diff --git a/modules/pacman/cmd/pacman-tools/view.go b/modules/pacman/cmd/pacman-tools/view.go index 6a1fea92..4521429b 100644 --- a/modules/pacman/cmd/pacman-tools/view.go +++ b/modules/pacman/cmd/pacman-tools/view.go @@ -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" ) diff --git a/modules/pacman/module.json b/modules/pacman/module.json index 0aa330d4..7029d0fe 100644 --- a/modules/pacman/module.json +++ b/modules/pacman/module.json @@ -12,7 +12,7 @@ } ], "reads": [ - "node-engine.packages", + "mesh-host.packages", "mesh-controller.declared-packages" ], "uses": [