Word a delivery that needs its author's new head as its author's, with no Stop (ADR 0505 §5)
mesh/repo-check head b7d03b68974d merged into trunk 8f2d22db0caa beside mesh-catalog#444@09e749bc — pass: its merge-check.sh passed
mesh/merge-gate head b7d03b68974d merged into trunk 8f2d22db0caa — pass: group feat/quiet-deliveries composed: every machine composes with the change as it…
mesh/delivery delivered
mesh/delivery-group group feat/quiet-deliveries merged: every member is merged
mesh/check checking b7d03b68974d on 8f2d22db0caa

This commit is contained in:
2026-10-22 14:25:26 +02:00
parent 8d562f9b22
commit b7d03b6897
3 changed files with 75 additions and 0 deletions
+26
View File
@@ -966,6 +966,9 @@ func stalledWords(l stalledLine, o conditions.Observation) (headline, explanatio
if l.State == "unanswered" {
return unansweredWords(l, o)
}
if l.Needs == needsNewHead {
return newHeadWords(l, name)
}
held := l.State
if held == "" {
held = "held"
@@ -999,6 +1002,29 @@ func stalledWords(l stalledLine, o conditions.Observation) (headline, explanatio
fmt.Sprintf("Delivery of %s is no longer %s", name, held), needs, actions
}
// newHeadWords are the words of a delivery whose cure is its author's new head (novox/hq ADR 0505 §5): it names the
// author and says a new head is needed; it offers no Stop and never calls it the operator's, because the operator
// hears of it only once the author's own watch has failed, after two hours with no new head.
func newHeadWords(l stalledLine, name string) (headline, explanation, resolved, needs string, actions []conditions.Action) {
pull := "A pull request of " + name
if l.Number > 0 {
pull = fmt.Sprintf("Pull request %d of %s", l.Number, name)
}
author := l.Author
if _, plain := conditions.Plain(author); !plain {
author = "its author" // a branch named in code (a dotted name, a number) is not said
}
long := "for a long time"
if d, err := time.ParseDuration(l.For); err == nil {
long = "for " + humanDuration(d)
}
return pull + " needs a new head from its author",
fmt.Sprintf("%s cannot merge until %s pushes a new head: its check failed after its Approve, and no new head "+
"came %s.", pull, author, long),
pull + " has a new head, or is closed",
"ask " + author + " for a new head.", nil
}
// stoppedNeeds is what ends a delivery that is already stopped, from the stalled line's healer words ("none: a
// merge that delivers its modules ends it — the operator's"): the part that says what ends it.
func stoppedNeeds(l stalledLine) string {