diff --git a/modules/mesh-delivery/cmd/mesh-delivery/issue438_test.go b/modules/mesh-delivery/cmd/mesh-delivery/issue438_test.go index 6467cbeb..9895e6fd 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/issue438_test.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/issue438_test.go @@ -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) } diff --git a/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go b/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go index 9bef2f7d..78acea05 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go @@ -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 } diff --git a/modules/mesh-delivery/cmd/mesh-delivery/verbs.go b/modules/mesh-delivery/cmd/mesh-delivery/verbs.go index 4523661e..a1800c04 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/verbs.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/verbs.go @@ -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 " — 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..stalled`.