Merge pull request 'A host adopts a delivered membership at start, not only after a declaration' (#37) from feat/a-host-adopts-a-membership-at-start into main

This commit was merged in pull request #37.
This commit is contained in:
2026-09-28 00:40:27 +00:00
+7 -2
View File
@@ -962,9 +962,14 @@ func runLink(ctx context.Context, opts options) error {
return nil // asked to stop while waiting return nil // asked to stop while waiting
} }
fmt.Printf("node %s, linking to %s\n", mine.Node, mine.Membership.Broker) // **A membership delivered while this host was not running is adopted before the first dial.**
// The ordinary path is a declaration, read after it applies; the rescue path is an operator
// writing the file by hand on a machine no bus can reach — rotated while it held the old
// password, say — and restarting the host (design 28, task 5.2). Same file, same check.
say := func(line string) { fmt.Println(line) } say := func(line string) { fmt.Println(line) }
adoptDeliveredMembership(identity.Path(opts.state), &mine, say)
fmt.Printf("node %s, linking to %s\n", mine.Node, mine.Membership.Broker)
// One scheduler for the life of the process, re-established from each applied declaration // One scheduler for the life of the process, re-established from each applied declaration
// (novox/hq ADR 0053). It fires scheduled steps on their cadence, surviving across applies and // (novox/hq ADR 0053). It fires scheduled steps on their cadence, surviving across applies and