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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user