The seat list's five-minute finding and the finding of a held module are raised as they happen, so they use the held writer (seeded at Start, Held() answers what stands) over the contract of the seat mesh-conditions; the keepers keep no set or sweep of their own, and the writer is started before the seat list reader writes or clears any. The engine's own finding stream stays its foundation stream mesh-host-findings. Builds: design 47 G §529, A-29, A-30, A-37, A-38, A-40 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
23 lines
1003 B
Go
23 lines
1003 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/novox/mesh-host/internal/selfcompose"
|
|
)
|
|
|
|
// ADR 0636 §1: when the node's reader of the seat list could not start, the composer is gated by a reader that never
|
|
// allows, where a missing reader would let the node act on everything; the shadow, which applies nothing, stays ungated.
|
|
func TestAReaderThatCouldNotStartHoldsTheComposer(t *testing.T) {
|
|
failed := composerEnv(nil, "n1", func(string) {}, composerHooks{seatListFailed: true})
|
|
if failed.SeatList == nil || failed.SeatList.MayAct() || failed.SeatList.MayAct("node-engine") {
|
|
t.Fatalf("the composer of a node whose reader did not start is gated by %v, want a gate that allows nothing", failed.SeatList)
|
|
}
|
|
if _, ok := failed.SeatList.(selfcompose.Unread); !ok {
|
|
t.Errorf("gate is %T", failed.SeatList)
|
|
}
|
|
if got := composerEnv(nil, "n1", func(string) {}, composerHooks{}).SeatList; got != nil {
|
|
t.Errorf("a composer with no reader asked for gates by %v, want none (the shadow)", got)
|
|
}
|
|
}
|