From a1fbd5dfa7d4eb6881f874da676f34df85e6fb15 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 10:41:44 +0100 Subject: [PATCH] Join 11: the merged heads compile where no area's fix is owed The join's importers name the delivery repository's moved contracts and sdk (MV1), node-tools' tests use mesh-sdk's gate, the duplicate node-engine claim rule of the reader release gives way to G's, and the assigner names its first watched branch, never a constant. The seat holders' AnswerSeat callers are area 6's. Builds: design 47 G join 11 (merge of fix round 11) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../compositioninputs.go | 10 +++++----- .../compositioninputs_test.go | 4 ++-- .../mesh-delivery-assigner/compositionrun.go | 7 ++++--- .../cmd/mesh-delivery-assigner/main.go | 2 +- modules/mesh-delivery-indexer/judge/rules.go | 19 ------------------- .../mesh-delivery-pipeline-tools/main_test.go | 2 ++ 6 files changed, 14 insertions(+), 30 deletions(-) diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs.go index 5f611a66..fa91aadb 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs.go @@ -36,15 +36,15 @@ func candidateKeyOf(run meshwants.StepRun) (string, error) { } // machinesFor are the machines of a step (A-252): the nodes whose placement of the module names the step's branch (a placement -// naming none is the trunk's); a branch that is not watched takes the nodes placing the module on the trunk. In name order. -func machinesFor(placed map[string]map[string]string, module, branch string, watched bool) []string { +// naming none is the trunk's, trunk the first watched branch); a branch that is not watched takes the nodes placing the module on the trunk. In name order. +func machinesFor(placed map[string]map[string]string, module, branch, trunk string, watched bool) []string { if branch == "" || !watched { - branch = trunkBranch + branch = trunk } var out []string for node, b := range placed[module] { if b == "" { - b = trunkBranch + b = trunk } if b == branch { out = append(out, node) @@ -56,7 +56,7 @@ func machinesFor(placed map[string]map[string]string, module, branch string, wat // machinesOf are the machines of a composition step in the world's assignments. func (w *world) machinesOf(module, branch string) []string { - return machinesFor(w.placedBranches(), module, branch, w.holdsBranch(branch)) + return machinesFor(w.placedBranches(), module, branch, w.trunkName(), w.holdsBranch(branch)) } // nodeInput is one machine's input: its bytes, or why the node gave none, or that it is away. diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs_test.go index 9b0f2bd9..26fb32a1 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositioninputs_test.go @@ -43,11 +43,11 @@ func TestTheMachinesOfAStep(t *testing.T) { {"gone", false, "ace novox"}, {"", true, "ace novox"}, } { - if got := strings.Join(machinesFor(placed, "m", c.branch, c.watched), " "); got != c.want { + if got := strings.Join(machinesFor(placed, "m", c.branch, trunkBranch, c.watched), " "); got != c.want { t.Errorf("branch %q watched %v: %q, want %q", c.branch, c.watched, got, c.want) } } - if got := machinesFor(placed, "none", "main", true); len(got) != 0 { + if got := machinesFor(placed, "none", "main", trunkBranch, true); len(got) != 0 { t.Errorf("a module placed nowhere has machines %v", got) } } diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go index 0aa88e22..ce9928c0 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionrun.go @@ -476,13 +476,14 @@ func heardPresence(a *awayNodes, away bool, m jetstream.Msg, logf func(string, . } } -// trunkOf is the trunk's catalog half the assigner's views hold, or false while none is held. -func trunkOf(iv *catalogViews) func() (mcc.Half, bool) { +// trunkOf is the trunk's catalog half the assigner's views hold, trunk naming the first watched branch, or false while none is +// held. +func trunkOf(iv *catalogViews, trunk func() string) func() (mcc.Half, bool) { return func() (mcc.Half, bool) { if iv == nil || iv.h == nil { return mcc.Half{}, false } - h, ok := iv.h.views()[trunkBranch] + h, ok := iv.h.views()[trunk()] return h, ok } } diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/main.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/main.go index 1f150a63..5f0c0ede 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/main.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/main.go @@ -662,7 +662,7 @@ func follow(ctx context.Context, js jetstream.JetStream, nc process.Subscriber, // The composition step (design 47 G §22, §354): the seat mesh-wants' accepted kind step, run by one run ask per machine. if bus != nil && js != nil && inputs != nil && p.publishWants != nil { run := &compositionRun{inputs: &compositionInputs{machines: w.machinesOf, call: bus.CallKeptOn}, keeper: inputs, call: bus.CallKept, - trunk: trunkOf(iv), running: w.runningOf, away: away, put: runAskPublisher(js), ends: ends, ask: bus.Call, now: time.Now, logf: logger.Printf} + trunk: trunkOf(iv, w.trunkName), running: w.runningOf, away: away, put: runAskPublisher(js), ends: ends, ask: bus.Call, now: time.Now, logf: logger.Printf} steps := &compositionSteps{node: thisNode, say: p.publishWants, run: run.run, now: time.Now, logf: logger.Printf, asker: stepAsker} if err := serveCompositionSteps(ctx, nc, steps); err != nil { logger.Printf("the composition step is not heard, so no composition step runs until the assigner starts again: %v", err) diff --git a/modules/mesh-delivery-indexer/judge/rules.go b/modules/mesh-delivery-indexer/judge/rules.go index 74cf6eac..6a389aca 100644 --- a/modules/mesh-delivery-indexer/judge/rules.go +++ b/modules/mesh-delivery-indexer/judge/rules.go @@ -8028,22 +8028,3 @@ func ObjectsCatalogueProblems(shelf catalogue.Shelf) []string { } return problems } - -// NodeEngineSeat is the seat the node-engine's module claims as one module (design 47 G §508). -const NodeEngineSeat = "node-engine" - -// nodeEngineClaimProblems refuses a revision in which more than one module claims the seat node-engine, naming them: one -// module claims it, the node-engine's own (design 47 G §508), in place of refusing every claim. -func nodeEngineClaimProblems(shelf catalogue.Shelf) []string { - var holders []string - for module, m := range shelf { - if slices.ContainsFunc(m.Claims, func(c catalogue.Claim) bool { return c.Name == NodeEngineSeat }) { - holders = append(holders, module) - } - } - if len(holders) < 2 { - return nil - } - slices.Sort(holders) - return []string{fmt.Sprintf("%s claim the seat %s, which one module claims (design 47 G §508)", strings.Join(holders, " and "), NodeEngineSeat)} -} diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go index 6b96f97a..6b75e988 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go @@ -3,7 +3,9 @@ package main import ( "encoding/json" "errors" + "fmt" + "git.novox.be/novox/mesh-sdk/go/buscalls" "strings" "testing" "time"