Share one prefix between the no-move Why's writer and its reader (review of #309, issue 648)
mesh/merge-gate head 70885ab3c4a3 merged into trunk ca3f43c400ba — pass: builds mesh-controller → novox; no bus step; every machine composes with the chang…
mesh/repo-check head 70885ab3c4a3 merged into trunk ca3f43c400ba — pass: its merge-check.sh passed
mesh/delivery delivered

This commit is contained in:
jochen
2026-10-14 02:22:25 +02:00
parent d9b86376d3
commit 70885ab3c4
+6 -2
View File
@@ -253,12 +253,16 @@ func gates(p inventory.Plan, edges []inventory.Edge, rollsOut func(string) bool)
// noMoveWhy is what a plan says of a module of its tier whose build was made from the source every machine // noMoveWhy is what a plan says of a module of its tier whose build was made from the source every machine
// running it runs (novox/hq issue 280): nothing is sent for it. // running it runs (novox/hq issue 280): nothing is sent for it.
const noMoveWhy = "no move: made from the source every machine running it runs" // noMovePrefix opens it, and is what noMove reads: one prefix for the writer and the reader.
const (
noMovePrefix = "no move"
noMoveWhy = noMovePrefix + ": made from the source every machine running it runs"
)
// noMove is whether the plan marked the module no move and sent it nothing. Read from what the plan says, // noMove is whether the plan marked the module no move and sent it nothing. Read from what the plan says,
// so a plan kept before the mark had a name of its own is read the same (novox/hq issue 648). // so a plan kept before the mark had a name of its own is read the same (novox/hq issue 648).
func noMove(s *inventory.PlanModule) bool { func noMove(s *inventory.PlanModule) bool {
return s != nil && s.FirstAt == nil && s.Gate == nil && strings.HasPrefix(s.Why, "no move") return s != nil && s.FirstAt == nil && s.Gate == nil && strings.HasPrefix(s.Why, noMovePrefix)
} }
// applied says whether every machine running the module has reported since the module was built. // applied says whether every machine running the module has reported since the module was built.