assigner: say a want held for want of a passed pipeline, and what a refused put's node runs

The want of mesh-delivery-pipeline on novox was not written and the assigner said nothing: a module whose fingerprint no
pipeline passed at on its branch gets none (design 47 G §29), and that return was silent. It is now said as any rule's
reason, once per node. A put refused because the builder holds no build of its fingerprint now names the build the
node's running statement says it runs, so the put of A-427 can name it.

Builds: design 47 G §29, A-427, A-420 (a path that says nothing)
This commit is contained in:
2026-11-15 16:03:29 +01:00
parent 21523a449f
commit d4ed5ae13f
2 changed files with 20 additions and 2 deletions
@@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"maps"
"mesh-delivery-assigner/internal/buckets"
"slices"
@@ -324,6 +325,7 @@ func (p *passer) wants(ctx context.Context) {
branches = []string{g.branch}
}
if fp != "" && !p.ends.mayWant(name, fp, branches, wantedOf[name]) {
p.sayNoWant(name, g.nodes, wantedOf[name], assign.Outcome{Rules: noPipelineRules(g.nodes, name, fp, branches)})
return
}
// A dependent's new version waits for its dependency's newest released version to be delivered (§376, A-189).
@@ -1489,3 +1491,14 @@ func wantedHere(wanted map[string]mwc.Want, own []string, groups []group, first
}
return out
}
// noPipelineRules is why each node of module gets no want while no pipeline passed at fp on its branches (design 47 G §29): said as
// any rule's reason (sayNoWant), once.
func noPipelineRules(nodes []string, module, fp string, branches []string) map[string]assign.Holding {
out := map[string]assign.Holding{}
for _, node := range nodes {
out[node] = assign.Holding{Rule: mwc.RuleNotHeld, Words: fmt.Sprintf("no pipeline of %s passed at %s on %s, and a want follows a passed pipeline (design 47 G §29)",
module, shortHex(fp), strings.Join(branches, ", "))}
}
return out
}
@@ -103,8 +103,13 @@ func StepPut(w PutWorld) PutNext {
case "":
if p.FP != w.Newest {
// The builder builds the trunk's newest fingerprint and the candidates', and takes no ask for another yet (ADR 0546
// clause 3): an older fingerprint it never built, or whose key it removed, cannot be put.
return say(puts.Refused, "the builder holds no build of %s at %s, and builds by itself only the trunk's newest (%s): put that, or a version it built", w.Module, fp, short(w.Newest))
// clause 3): an older fingerprint it never built, or whose key it removed, cannot be put; the build the node runs now
// can (A-427), and the refusal names it.
runs := "states no running build of it"
if r := w.Running; r != nil && !r.Stopped && r.Fingerprint != "" {
runs = "runs " + short(r.Fingerprint)
}
return say(puts.Refused, "the builder holds no build of %s at %s, and builds by itself only the trunk's newest (%s), and %s %s by its running statement: put that, or a version the builder built", w.Module, fp, short(w.Newest), w.Node, runs)
}
return say(puts.Build, "waits for the builder's build of %s at %s, the trunk's newest, which it builds by itself", w.Module, fp)
default: