pacman reads a node's declared packages in the node-engine seat's layout, not go/delivery's (B5e; ADR 0634 §1, §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:39:13 +01:00
parent 597910c291
commit 0f1d4c5e0f
3 changed files with 11 additions and 9 deletions
@@ -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)
}
}
+9 -6
View File
@@ -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 {
+1
View File
@@ -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