H-17: the node-engine's own name is read from its applied record or first composing
Discovery, the finding writer and the vault login names read it; no fixed name. Builds: design 47 G §527, §634 (A-149)
This commit is contained in:
@@ -601,16 +601,13 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
// And the seat list it reads through the seat mesh-catalog, from its bootstrapped definitions until it has: the
|
||||
// composer hands nothing new meanwhile, and the node says it has waited five minutes (novox/hq ADR 0636 §1).
|
||||
// The finding writer is started first, so it holds what an earlier run left before the reader writes or clears any.
|
||||
findings, ferr := newFindingsOfTheNode(session, node, say)
|
||||
if ferr != nil { // a writer that cannot be made is a fault of its configuration: loud, never a node without findings
|
||||
say("the node-engine cannot make its finding writer, so its node agent stops: " + ferr.Error())
|
||||
stopRun()
|
||||
cancel()
|
||||
return
|
||||
}
|
||||
if werr := findings.Start(run); werr != nil {
|
||||
say("the node-engine's findings are kept in its state and not said as events until it is started again: " + werr.Error())
|
||||
if session.Own == nil {
|
||||
session.Own = link.NewOwnName()
|
||||
}
|
||||
findings := &lateFindings{own: session.Own, make: func(module string) (*findingsOfTheNode, error) {
|
||||
return newFindingsOfTheNode(session, node, module, say)
|
||||
}}
|
||||
findings.Start(run, say)
|
||||
seats, err := startSeatList(run, session, node, findings, say)
|
||||
if err != nil {
|
||||
// No reader is no gate that lets everything through: the node acts on nothing new, as one that waits does.
|
||||
@@ -618,10 +615,10 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
}
|
||||
// The marks of the haves run off the composition pass, each bounded (see marker).
|
||||
marks := newMarker(run)
|
||||
heldFindings := &seatwait.HeldKeeper{Node: node, Observer: findingsModule, Writer: findings, Ctx: run, Say: say}
|
||||
heldFindings := &seatwait.HeldKeeper{Node: node, ObserverOf: findings.observer, Writer: findings, Ctx: run, Say: say}
|
||||
hooks := composerHooks{
|
||||
entryNotFound: func(fp string, notFound bool) {
|
||||
if err := seatwait.SayEntryNotFound(run, findings, node, findingsModule, fp, notFound, time.Now); err != nil {
|
||||
if err := seatwait.SayEntryNotFound(run, findings, node, findings.observer(), fp, notFound, time.Now); err != nil {
|
||||
say("the finding that the catalog half holds no entry of " + fp + " cannot be kept: " + err.Error())
|
||||
}
|
||||
},
|
||||
@@ -687,6 +684,7 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
// composition bucket) is never applied. While the seat's assignment holds no key for this node it composes
|
||||
// nothing and keeps running what it runs; a assignment it cannot watch stops the agent, said, and it begins again.
|
||||
composer := selfComposer(session, node, hooks, say)
|
||||
composer.OnEngine = session.Own.Set // the first composing names the engine's own module on a first start (§527, §634)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user