Node-engine: say whether its seat is served and how long the first looks of what runs and of the accounts take (A-405)

Live on novox 2026-11-14 root-free answered 'judged no account yet' minutes after the start and nothing was logged:
the seat's serving and the first looks were silent.
This commit is contained in:
2026-11-14 15:59:28 +01:00
parent eaf011e971
commit 6079f634d6
2 changed files with 18 additions and 0 deletions
+15
View File
@@ -1262,6 +1262,7 @@ const (
// anyway. A statement the bus did not take is said at the next look. It reads; it never acts (ADR 0240
// rule 6) — but for going on with a take act stopped at its bound (ADR 0328 §7), which runs beside it.
func judgeWhatRuns(ctx context.Context, j *liveness.Judge, queue *link.Session, say link.Announce, reapply, reconcile func(modules ...string)) {
say("the looks of what runs and of the accounts start (A-405)")
var missingBefore, inactiveBefore map[string]bool
ticker := time.NewTicker(liveness.LookEvery)
defer ticker.Stop()
@@ -1284,8 +1285,16 @@ func judgeWhatRuns(ctx context.Context, j *liveness.Judge, queue *link.Session,
case <-nudged:
owed = true
}
first := lastAccounts.Load() == nil
began := time.Now()
if first {
say("the first look of what runs begins (A-405)")
}
st, changed := j.Look(ctx)
owed = owed || changed
if first {
say(fmt.Sprintf("the first look of what runs took %s; units and accounts next (A-405)", time.Since(began).Round(time.Millisecond)))
}
var unitSt *units.Statement
if u := unitJudge; u != nil {
us, unitsChanged := u.Look(ctx)
@@ -1299,9 +1308,15 @@ func judgeWhatRuns(ctx context.Context, j *liveness.Judge, queue *link.Session,
}
var accountSt *accounts.Statement
if a := accountJudge; a != nil {
if first {
say(fmt.Sprintf("the first look of the accounts begins at %s (A-405)", time.Since(began).Round(time.Millisecond)))
}
as, accountsChanged := a.Look(ctx)
accountSt = &as
lastAccounts.Store(&as)
if first {
say(fmt.Sprintf("the first look of the accounts ended at %s: %d accounts (A-405)", time.Since(began).Round(time.Millisecond), len(as.Accounts)))
}
owed = owed || accountsChanged
if accountsChanged {
for _, v := range as.Accounts {
+3
View File
@@ -7,6 +7,7 @@ import (
"encoding/json"
"errors"
"fmt"
"log"
"sort"
"strings"
"time"
@@ -157,6 +158,7 @@ func (l *natsLink) serveEngineSeat(handle EngineFunc, module string) {
Description: "the node seat node-engine of " + l.node + " (novox/hq ADR 0563)", QueueGroupDisabled: true,
Metadata: map[string]string{"seat": EngineSeat, "scope": "node", "node": l.node}})
if err != nil {
log.Printf("the node seat %s of %s is not served: %v (A-405)", EngineSeat, l.node, err)
return
}
apart := make(chan struct{}, apartAtOnce)
@@ -172,6 +174,7 @@ func (l *natsLink) serveEngineSeat(handle EngineFunc, module string) {
l.engineMu.Lock()
l.engine = svc
l.engineMu.Unlock()
log.Printf("the node seat %s of %s is served as %s (A-405)", EngineSeat, l.node, module)
}
// answeredApart are the verbs answered off the subscription that delivered them: each endpoint's subscription hands its