diff --git a/cmd/mesh-controller/plan.go b/cmd/mesh-controller/plan.go index 46d269b..f5acc6a 100644 --- a/cmd/mesh-controller/plan.go +++ b/cmd/mesh-controller/plan.go @@ -7,6 +7,7 @@ import ( "errors" "flag" "fmt" + "os" "sort" "strings" @@ -281,8 +282,9 @@ func theRestOfTheMesh(ctx context.Context, inv *inventory.Inventory, for _, o := range others { got, err := catalogue.Resolve(shelf, o.assigned, o.node, catalogue.World{Unchecked: true, Holdings: holdings}) if err != nil { - // Their set does not resolve for some other reason. Not this node's problem to - // report, and nothing of theirs is running, so it offers nothing. + // Said, not skipped: a machine dropped here offers nothing and holds nothing as far + // as every other machine's plan can tell (novox/hq issue 188). + fmt.Fprintf(os.Stderr, "%s is left out of the rest of the mesh: it does not resolve: %v\n", o.node.Name, err) continue } firstHeld = append(firstHeld, got.Claims...) @@ -313,8 +315,17 @@ func theRestOfTheMesh(ctx context.Context, inv *inventory.Inventory, world := catalogue.World{Offered: offered, Held: firstHeld, Holdings: holdings} var held []catalogue.Held for _, o := range others { - got, err := catalogue.Resolve(shelf, o.assigned, o.node, world) + // Each machine is resolved with its own pins, as its plan is: a machine that needs one to + // settle two providers would otherwise be refused here and vanish from the mesh — every + // seat it holds unheld, every build that needs one refused (2026-10-01, the control node; + // novox/hq issue 188). + theirs := world + if pins, err := inv.PinsFor(ctx, o.node.Name); err == nil { + theirs.Pinned = pins + } + got, err := catalogue.Resolve(shelf, o.assigned, o.node, theirs) if err != nil { + fmt.Fprintf(os.Stderr, "%s is left out of the rest of the mesh: it does not resolve: %v\n", o.node.Name, err) continue } held = append(held, got.Claims...)