H-5: the seats a node passes on are decided from what every node said it runs, by SeatsToPassOn's new input
The node follows the node-engine seat's running events (an ordered read of the last message of each subject, then a durable consumer), keeps what each node runs by `at`, acts on none until the first read ended, and hands the composer each node's heard build with the manifest read by the event's digest; compose resolves the passes through catalogue.SeatsToPassOn (heard, entries) with the trunk's entry for a node that said nothing. Builds: design 47 G §199, §249, §459, §536, §556 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -669,6 +669,7 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
machinesNow.Store(composer) // the machines a failing network part points at, by the assignments (issue 774)
|
||||
composerNow.Store(composer) // what the verb compose asks a pass of, this run's alone
|
||||
session.SetManifestOf(composer.ManifestOf) // the event running names the manifest of the build that runs
|
||||
go followRunning(run, session, composer, say)
|
||||
env.Composed, env.SelfComposed, env.Policy, env.ComposedToday = composer, true, composer.Policy, composer.ComposedToday
|
||||
env.WhyUnmade, env.Waiting = composer.WhyUnmade, composer.Waiting
|
||||
env.HoldsData = composer.HoldsData // what runs from the kept declaration says Data as its manifest does
|
||||
@@ -1133,3 +1134,29 @@ func composerEnv(session *link.Session, node string, say func(string), hooks com
|
||||
}
|
||||
return env
|
||||
}
|
||||
|
||||
// followRunning keeps the composer told what every node runs, from the seat node-engine's event running, for the run it is
|
||||
// in: the stream or the link not being there is said and tried again after a backoff, never polled.
|
||||
func followRunning(run context.Context, session *link.Session, composer *selfcompose.Composer, say func(string)) {
|
||||
said := ""
|
||||
for try := 1; run.Err() == nil; try++ {
|
||||
began := time.Now()
|
||||
err := session.FollowRunning(run, composer.NoteRunning, composer.RunningRead)
|
||||
composer.RunningLost()
|
||||
if run.Err() != nil {
|
||||
return
|
||||
}
|
||||
if time.Since(began) > time.Minute {
|
||||
try = 1
|
||||
}
|
||||
if why := fmt.Sprint(err); why != said {
|
||||
say("this node does not hear what the nodes run, and tries again: " + why)
|
||||
said = why
|
||||
}
|
||||
select {
|
||||
case <-run.Done():
|
||||
return
|
||||
case <-time.After(link.Backoff(try)):
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user