Tool runner: the console, its test bed and the provider read placement, the catalogue's keys and the provisions through the seats' clients, not go/delivery, go/provider or go/provisions (T-1, ADR 0634 §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:31:22 +01:00
parent fce9189579
commit 387f547346
9 changed files with 114 additions and 52 deletions
+10 -2
View File
@@ -13,6 +13,7 @@ import (
"fmt"
conditions "git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
condseat "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions"
assigner "git.novox.be/novox/mesh-contracts/placement/go/clients/meshmoduleassignerclient"
"sort"
"sync"
"time"
@@ -25,7 +26,14 @@ import (
// The owners and their first-view tools (the tools' addresses are `<owner>.<tool>`).
const (
Indexer = "mesh-delivery-indexer"
Assigner = "mesh-delivery-assigner"
Assigner = assigner.Module
)
// The names the console reads the indexer's two states by (`<owner>.<state>`), as a manifest's `reads` names them; the
// assigner's two are its client's (assigner.PlacementRead, assigner.SeatHoldersRead).
const (
ModulesRead = Indexer + ".modules"
ManifestsRead = Indexer + ".manifests"
)
// Spec is one first view the runner holds.
@@ -39,7 +47,7 @@ var Specs = []Spec{
{Indexer, "modules", "modules"},
}
// Name is the name a state is read by, `<owner>.<state>`: delivery.PlacementRead, delivery.SeatHoldersRead and the indexer's.
// Name is the name a state is read by, `<owner>.<state>`: assigner.PlacementRead, assigner.SeatHoldersRead and the indexer's.
func (s Spec) Name() string { return s.Owner + "." + s.State }
// Views is the four followers.
@@ -9,6 +9,7 @@ import (
"testing"
"time"
assigner "git.novox.be/novox/mesh-contracts/placement/go/clients/meshmoduleassignerclient"
"git.novox.be/novox/mesh-sdk/go/views"
"github.com/novox/mesh-tools/node-tools/internal/bus"
@@ -166,3 +167,18 @@ func TestTheRunnerHoldsTheFourStatesFromTheOwnersFirstViewsAndTheirEvents(t *tes
t.Errorf("the gap was not said in the log: %v", logs)
}
}
// The four first views are read by the names the seats' clients give the states, and the console reads the indexer's
// two by the names here.
func TestTheFirstViewsAreNamedAsTheClientsNameTheirStates(t *testing.T) {
want := map[string]bool{assigner.PlacementRead: true, assigner.SeatHoldersRead: true, ModulesRead: true, ManifestsRead: true}
for _, s := range Specs {
if !want[s.Name()] {
t.Errorf("the first view %s is read by no name a client gives", s.Name())
}
delete(want, s.Name())
}
if len(want) > 0 {
t.Errorf("no first view reads %v", want)
}
}