From 0f1d4c5e0f1f4cec9306bcb69b1e5d9f8760f864 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 15:39:13 +0100 Subject: [PATCH] =?UTF-8?q?pacman=20reads=20a=20node's=20declared=20packag?= =?UTF-8?q?es=20in=20the=20node-engine=20seat's=20layout,=20not=20go/deliv?= =?UTF-8?q?ery's=20(B5e;=20ADR=200634=20=C2=A71,=20=C2=A74;=20issue=201966?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- .../cmd/pacman-tools/keeper_manifest_test.go | 4 +--- modules/pacman/cmd/pacman-tools/view.go | 15 +++++++++------ modules/pacman/go.mod | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go b/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go index 59f04fbba..658c1e7da 100644 --- a/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go +++ b/modules/pacman/cmd/pacman-tools/keeper_manifest_test.go @@ -14,8 +14,6 @@ import ( "reflect" "strings" "testing" - - "git.novox.be/novox/mesh-sdk/go/delivery" ) // rawManifest is the manifest as written, every field kept. @@ -135,7 +133,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{delivery.EnginePackagesRead}) { + if got := strs(raw["reads"]); !reflect.DeepEqual(got, []string{SourceEngine}) { t.Errorf("reads: %v", got) } } diff --git a/modules/pacman/cmd/pacman-tools/view.go b/modules/pacman/cmd/pacman-tools/view.go index be6710287..16a174909 100644 --- a/modules/pacman/cmd/pacman-tools/view.go +++ b/modules/pacman/cmd/pacman-tools/view.go @@ -8,11 +8,10 @@ package main import ( "encoding/json" "fmt" + nodeengine "git.novox.be/novox/mesh-contracts/go/seats/nodeengine" "sort" "strings" "time" - - "git.novox.be/novox/mesh-sdk/go/delivery" ) // DeclaredPackagesState is the node-engine's state of the packages its node's modules declare, one key per node, @@ -21,13 +20,17 @@ import ( const DeclaredPackagesState = SourceEngine // SourceEngine is the one source 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). The +// its manifest's name (mesh-host.packages, its bucket mesh-host_packages; mesh-sdk SourceEngine). The // controller's mirror of the same packages ended with its lease (ADR 0565 clause 6, issue 774): a node whose engine has // written no key has no declaration here, and the answer says so. -const SourceEngine = delivery.EnginePackagesRead +// engineHolder is the holder of the node-engine seat whose state packages is read: the one name of it here, held equal to the +// manifest's `reads` by the manifest test. +const engineHolder = "mesh-host" -// declaredValue is a node's key of `packages`, in mesh-sdk's layout. -type declaredValue = delivery.DeclaredPackages +const SourceEngine = engineHolder + "." + nodeengine.StatePackages + +// declaredValue is a node's key of `packages`, in the seat node-engine's layout. +type declaredValue = nodeengine.PackagesByNodeValue // nodeInstalled is one node's key of `installed` with its not-current mark. type nodeInstalled struct { diff --git a/modules/pacman/go.mod b/modules/pacman/go.mod index 722ed0807..08331871b 100644 --- a/modules/pacman/go.mod +++ b/modules/pacman/go.mod @@ -3,6 +3,7 @@ module pacman go 1.26.0 require ( + git.novox.be/novox/mesh-contracts/go/seats/nodeengine v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-contracts/operator-and-conversation/go/clients/operatorchannelclient v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-contracts/operator-and-conversation/go/seats/operatorchannel v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-sdk/go v0.1.14-0.20261104174359-05b3e2e1b94f