Node composer: while the seat list is unread the node's own composition is held too, whole, under the scope node; only what runs and the bootstrapped modules go on (ADR 0636 §1; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -1812,17 +1812,25 @@ func TestAnUnreadSeatListHoldsWhatIsNewAndHandsItAtTheRead(t *testing.T) {
|
||||
t.Errorf("the node handed %s before it read the seat list", k)
|
||||
}
|
||||
}
|
||||
if !handed["n1.node"] {
|
||||
t.Errorf("the node's own composition was held with the module: %v", handed)
|
||||
// The node's own composition folds modules and accounts it cannot judge before the read: held whole (the ruling of
|
||||
// ADR 0636 §1), under the scope agent.NodeModule.
|
||||
mu.Lock()
|
||||
ownWhy := heldBy[agent.NodeModule]
|
||||
mu.Unlock()
|
||||
if ownWhy != WaitsForTheSeatListOwn || handed["n1.node"] {
|
||||
t.Errorf("the node's own composition is held with %q and handed=%v, want %q and not handed: %v", ownWhy, handed["n1.node"], WaitsForTheSeatListOwn, handed)
|
||||
}
|
||||
// The reader reads the list and says so: the module is handed, with no timer.
|
||||
// The reader reads the list and says so: the module and the node's own are handed, with no timer.
|
||||
g.open.Store(true)
|
||||
changed <- struct{}{}
|
||||
for {
|
||||
seen := map[string]bool{}
|
||||
for !(seen["lemurs"] && seen["node"]) {
|
||||
u := next(t, out)
|
||||
if strings.Contains(u.Key, "lemurs") && !u.Deleted {
|
||||
break
|
||||
if u.Deleted {
|
||||
continue
|
||||
}
|
||||
seen["lemurs"] = seen["lemurs"] || strings.Contains(u.Key, "lemurs")
|
||||
seen["node"] = seen["node"] || u.Key == "n1.node"
|
||||
}
|
||||
mu.Lock()
|
||||
still := heldBy["lemurs"]
|
||||
|
||||
Reference in New Issue
Block a user