M6 networkmanager: the bundle gives the resolver the check's name

The bundle calls this node's node-resolver uplink-names with the check address's host
at its start, at a changed check-address, at its bus connection's return and when this
node's holder of node-resolver runs, reading the holder from the assignments; no holder
is recorded and no failure, a failed call stands failed in names.json until the next
moment.

Builds: design 08 sign-in-page §12, §13, §22
This commit is contained in:
jochen
2026-11-24 21:23:56 +01:00
parent f6646c7254
commit 786a23638b
6 changed files with 356 additions and 13 deletions
@@ -84,17 +84,20 @@ func TestTheBundlePublishesAtEachMoment(t *testing.T) {
f := aFolder(t)
keepThree(t, f)
stream := &fakeStream{refuse: map[string]bool{"laptop.sign-in-ended.1": true}}
b := &bundle{folder: f, pub: &publisher{folder: f, publish: stream.publish}}
b := &bundle{folder: f, pub: &publisher{folder: f, publish: stream.publish}, names: &namer{folder: f, now: time.Now,
ask: func(string, any) (json.RawMessage, error) { return json.RawMessage(`{"seats":[]}`), nil }}}
files := make(chan struct{})
var hook func(stdio.Heartbeat)
done := make(chan struct{})
go func() {
b.start(func(dirs []string, _ <-chan struct{}) <-chan struct{} {
b.start(bundleRuns{files: func(dirs []string, _ <-chan struct{}) <-chan struct{} {
if len(dirs) != 1 || !strings.HasSuffix(dirs[0], "/pending") {
t.Errorf("watched %v", dirs)
}
return files
}, func(h func(stdio.Heartbeat)) error { hook = h; return nil })
}, fileMade: func(string, string, <-chan struct{}) <-chan struct{} { return nil },
onHeartbeat: func(h func(stdio.Heartbeat)) error { hook = h; return nil },
subscribe: func(string, func(stdio.Envelope) error) error { return nil }})
close(done)
}()
files <- struct{}{} // the start's round ran and was refused; this one publishes what waits