mesh-delivery: an unanswered line names its checks in a field of their own (issue 438)
mesh/merge-gate pass: builds gitea, mesh-delivery → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered
mesh/delivery-group group fix/438-a-check-that-never-answered-is-said delivered: every member is delivered

The controller's words for the line (mesh-controller #213) name the checks waited
on; a field spares them reading the sentence.
This commit is contained in:
2026-10-11 02:25:48 +02:00
parent 1f48a29495
commit 450892498d
3 changed files with 18 additions and 8 deletions
@@ -2,6 +2,7 @@ package main
import (
"encoding/json"
"slices"
"strings"
"testing"
"time"
@@ -65,6 +66,11 @@ func TestAHeadWhoseCheckStartedAndNeverAnsweredIsSaid(t *testing.T) {
t.Fatalf("the line does not say %q: %s", want, l.Says)
}
}
if want := []string{"mesh/merge-gate pending since 2026-10-11T00:11:39Z", "mesh/repo-check never set"}; !slices.Equal(l.Waiting, want) {
t.Fatalf("the line's checks waited on are %q, not %q", l.Waiting, want)
}
raw, _ := json.Marshal(l)
t.Logf("the line as the controller reads it: %s", raw) // mesh-controller's test of its words reads this line
if strings.Contains(l.Says, "mesh/delivery") {
t.Fatalf("the line names a status that is not the merge check: %s", l.Says)
}
@@ -208,9 +208,9 @@ func (h *Holder) uncheckedLines(now time.Time) []StalledLine {
says := fmt.Sprintf("%s/%s#%d is open on %s, which requires the merge check, and its head has had no merge "+
"check: the mesh was never asked to check it. A new commit on its branch announces it",
u.pull.Owner, u.pull.Repo, u.pull.Number, u.pull.Base)
state := Unannounced
state, waiting := Unannounced, []string(nil)
if u.started() {
state = Unanswered
state, waiting = Unanswered, u.waiting
says = fmt.Sprintf("%s/%s#%d is open on %s, which requires the merge check, and its head's check started "+
"and never answered: %s. No delivery of it is held here, so nothing asks it again. A new commit on "+
"its branch announces it and asks its check", u.pull.Owner, u.pull.Repo, u.pull.Number, u.pull.Base,
@@ -219,7 +219,7 @@ func (h *Holder) uncheckedLines(now time.Time) []StalledLine {
}
out = append(out, StalledLine{ID: id, Number: u.pull.Number, State: state, For: now.Sub(u.first).Round(time.Second).String(),
Bound: u.bound().String(),
H2: h2, Says: says})
H2: h2, Says: says, Waiting: waiting})
}
return out
}
@@ -170,11 +170,15 @@ type StalledLine struct {
Number int `json:"number,omitempty"`
State State `json:"state"`
// Walk is the walk a line of the state Unheld is about (novox/hq issue 362).
Walk string `json:"walk,omitempty"`
For string `json:"for"`
Bound string `json:"bound"`
H2 string `json:"h2"`
Says string `json:"says"`
Walk string `json:"walk,omitempty"`
// Waiting are the merge checks a line of the state Unanswered waits on, each as it reads — "mesh/repo-check
// never set", "mesh/merge-gate pending since <UTC time>" — so the controller's words name them without reading
// Says (novox/hq issue 438).
Waiting []string `json:"waiting,omitempty"`
For string `json:"for"`
Bound string `json:"bound"`
H2 string `json:"h2"`
Says string `json:"says"`
}
// Stalled is the `stalled` verb: what the controller's self-check raises as `delivery.<id>.stalled`.