G §683: a start composes the modules whose kept want and entry it holds before its other inputs are read
The node's own record comes from the node-engine's statement of itself, taken in memory with no bus. Builds: design 47 G A-117, A-120, §683, A-95 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -125,10 +125,19 @@ func composeFromEntries(t *testing.T) {
|
||||
mu.Unlock()
|
||||
env2 := b.env()
|
||||
env2.Entry, env2.ComposedState = EntryCall(ask), state
|
||||
// The node's own record, stated by the node-engine of itself in memory (A-120).
|
||||
env2.NodeRecord = func() (nodeengine.NodeRecord, bool) {
|
||||
return nodeengine.NodeRecord{Node: "n1", TunnelKey: "k", SealingKey: "sk", Capabilities: []string{"systemd"}}, true
|
||||
}
|
||||
c2 := New(env2)
|
||||
if _, err := c2.Watch(ctx, "n1.>"); err != nil {
|
||||
out2, err := c2.Watch(ctx, "n1.>")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// And composes the module it kept a want and an entry of before any input is read, nothing of the others (design 47 G §683, A-117).
|
||||
if u := next(t, out2); u.Key != lemursKey || u.Deleted {
|
||||
t.Errorf("the early pass handed %q, want the composition %s of lemurs", u.Key, lemursKey)
|
||||
}
|
||||
c2.mu.Lock()
|
||||
kept, keptWant := c2.keptEnt[fp], c2.wants["lemurs"].Fp
|
||||
c2.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user