Follow L2 under L3: the vault and mesh-config read the seat mesh-placement's placement, and the check that only listed modules read the controller's assignments moves into noplacement, as L2 deleted the placement check (issue 774, ADR 0567, ADR 0549 §3, §6)

This commit is contained in:
2026-10-28 21:54:36 +01:00
parent 24fad2b92a
commit 5be6576117
17 changed files with 139 additions and 31 deletions
@@ -121,13 +121,13 @@ func (m *memStore) mirror(t *testing.T, read, key, raw string) {
m.states[read][key] = []byte(raw)
}
// assign puts module on node in the catalogue's placement (ADR 0549 §3), beside what is placed there already.
// assign puts module on node in the seat's placement (ADR 0549 §3), beside what is placed there already.
func (m *memStore) assign(t *testing.T, node, module string) {
t.Helper()
m.place(t, node, func(modules []string) []string { return append(modules, module) })
}
// unassign takes module off node in the catalogue's placement.
// unassign takes module off node in the seat's placement.
func (m *memStore) unassign(t *testing.T, node, module string) {
t.Helper()
m.place(t, node, func(modules []string) []string {
@@ -592,7 +592,7 @@ func TestTheVerbsArgumentsAreReadStrictly(t *testing.T) {
}
}
// Issue 774 (ADR 0549 §3, §5): the catalogue's placement alone says where modules stand. Before any node's placement
// Issue 774 (ADR 0549 §3, §5): the seat's placement alone says where modules stand. Before any node's placement
// is read nothing is resolved anew and what is resolved stays; a placement that does not read resolves nothing on its
// node, said.
func TestThePlacementAloneSaysWhereValuesResolve(t *testing.T) {
@@ -121,7 +121,7 @@ type Published struct {
Commit string `json:"commit"`
}
// Assignment is a module the catalogue's placement puts on a node (ADR 0549 §3): what a resolution resolves values for.
// Assignment is a module the seat's placement puts on a node (ADR 0549 §3): what a resolution resolves values for.
type Assignment struct {
Node string
Module string
@@ -2,7 +2,7 @@ package main
import "testing"
// 1126 (ADR 0549 §3), issue 774: a module the catalogue's placement names on a node resolves there; it goes when the
// 1126 (ADR 0549 §3), issue 774: a module the seat's placement names on a node resolves there; it goes when the
// placement no longer names it. A module another pulls in is placed in its own right (the seed placed what runs).
func TestAModulePlacedHasItsValuesResolvedOnItsNode(t *testing.T) {
c, m := aMesh(t)
@@ -122,10 +122,10 @@ type Resolved struct {
// ResolvedKey is a resolved value's key in mesh-config_resolved.
func ResolvedKey(node, module, key string) string { return node + "." + module + "." + key }
// Sources is everything a resolution reads: where modules stand (the catalogue's placement), every module's
// Sources is everything a resolution reads: where modules stand (the seat's placement), every module's
// declarations, the published list of predefined keys, and every value set.
type Sources struct {
// Assignments is every module the catalogue's placement puts on a node (ADR 0549 §3), and Placed whether any node's
// Assignments is every module the seat's placement puts on a node (ADR 0549 §3), and Placed whether any node's
// placement was read: without one nothing is resolved anew.
Assignments []Assignment
Placed bool