Every module follows the assigner's new places: the contracts' go/ path, mesh-wants in the delivery contracts, the state and tool assignments (issue 1966)

The legacy key form placement.<node> is gone from the client, so the readers and their fixtures lose it. The check noplacement
now also refuses the assigner's retired names in a manifest.

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 22:29:07 +01:00
parent 2dc9e07e88
commit c9d8950fd0
109 changed files with 682 additions and 681 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ package main
import (
"context"
"fmt"
mesh "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
mesh "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
"os"
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
@@ -2,7 +2,7 @@ package main
import (
"encoding/json"
mesh "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
mesh "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
"os"
"strings"
"testing"
@@ -21,7 +21,7 @@ func manifest(t *testing.T) map[string]any {
return m
}
// 1516/AC6: minio claims object-store (scope mesh) serving link, reads the placement seat's seat-holders, builds the Go
// 1516/AC6: minio claims object-store (scope mesh) serving link, reads the assignments seat's seat-holders, builds the Go
// bundle, and no tool named minio_presigned_url remains.
func TestManifestClaimsTheSeat(t *testing.T) {
m := manifest(t)
+4 -4
View File
@@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
assignerclient "git.novox.be/novox/mesh-contracts/placement/go/clients/meshmoduleassignerclient"
assignerclient "git.novox.be/novox/mesh-contracts/go/clients/meshmoduleassignerclient"
"os"
"path/filepath"
"strings"
@@ -58,7 +58,7 @@ func linkKeyID(bucket string) string {
type server struct {
configPath, linksDir, receives string
now func() time.Time
// seats is the picture of the placement seat's state of who holds which seat, every key: asked of the assigner once
// seats is the picture of the assignments seat's state of who holds which seat, every key: asked of the assigner once
// and followed by its events (ADR 0615); a test replaces it.
seats func() (map[string][]byte, error)
}
@@ -197,7 +197,7 @@ func (s *server) allowed(g grant, node, module, method string) error {
if seat, isSeat := strings.CutPrefix(sh.To, "seat:"); isSeat {
held, err := s.holds(seat, node, module)
if err != nil {
return false, fmt.Errorf("a share names seat %s and the placement seat's holders cannot be read to tell whether this caller holds it: %w", seat, err)
return false, fmt.Errorf("a share names seat %s and the assignments seat's holders cannot be read to tell whether this caller holds it: %w", seat, err)
}
return held, nil
}
@@ -240,7 +240,7 @@ func has(list []string, v string) bool {
return false
}
// holds says whether node.module holds the seat, from the placement seat's state of who holds which seat (novox/hq ADR
// holds says whether node.module holds the seat, from the assignments seat's state of who holds which seat (novox/hq ADR
// 0571 clause 4), from the picture the assigner's first view and events keep. No first view yet is refused, saying so.
func (s *server) holds(seat, node, module string) (bool, error) {
keys, err := s.seats()
@@ -24,7 +24,7 @@ const grantFile = `{
]
}`
// The placement seat's state of who holds which seat (seat-holders): a key per node seat and node, a key per mesh seat.
// The assignments seat's state of who holds which seat (seat-holders): a key per node seat and node, a key per mesh seat.
var seatHolderKeys = map[string][]byte{
"node-files.g14": []byte(`{"v":1,"seat":"node-files","scope":"node","node":"g14","holders":[{"module":"mesh-files","node":"g14"}]}`),
"node-files.shanks": []byte(`{"v":1,"seat":"node-files","scope":"node","node":"shanks","holders":[{"module":"mesh-files","node":"shanks"}]}`),