From 645961a87b36b948a4fb1fd861d2fa283f2d7cd8 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Oct 2026 13:41:59 +0200 Subject: [PATCH] mesh-cli at go/v0.1.9, and the unannounced pull request's number (hq ADR 0272, issue 347) - mesh-cli pins the SDK at its tag now that go/v0.1.9 exists, instead of a pseudo-version of the branch it was cut from. - mesh-delivery's stalled line for a head the forge never announced carries the pull request's number, which the controller's condition names in its headline. --- modules/mesh-cli/go.mod | 2 +- modules/mesh-cli/go.sum | 4 ++-- .../mesh-delivery/cmd/mesh-delivery/unchecked.go | 2 +- .../cmd/mesh-delivery/unchecked_test.go | 3 +++ modules/mesh-delivery/cmd/mesh-delivery/verbs.go | 14 ++++++++------ 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/mesh-cli/go.mod b/modules/mesh-cli/go.mod index 4d6d5938..54ca3371 100644 --- a/modules/mesh-cli/go.mod +++ b/modules/mesh-cli/go.mod @@ -2,4 +2,4 @@ module mesh-cli go 1.22 -require git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b +require git.novox.be/novox/mesh-sdk/go v0.1.9 diff --git a/modules/mesh-cli/go.sum b/modules/mesh-cli/go.sum index 22f2ed57..069f9d0c 100644 --- a/modules/mesh-cli/go.sum +++ b/modules/mesh-cli/go.sum @@ -1,2 +1,2 @@ -git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b h1:HmasScQ02QeFlAFDnmRCOEserbtDJJtutK+acBmGlNs= -git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b/go.mod h1:GFuZUElBZ9A++mxgIKo97aXXo+kV0uJ/UkbhQPPIbrY= +git.novox.be/novox/mesh-sdk/go v0.1.9 h1:2zq9tbwoXEYi+dDBxPoeNmn39KdRRKRp8CK33F4LWd0= +git.novox.be/novox/mesh-sdk/go v0.1.9/go.mod h1:GFuZUElBZ9A++mxgIKo97aXXo+kV0uJ/UkbhQPPIbrY= diff --git a/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go b/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go index dad89f81..e8c67ed7 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/unchecked.go @@ -94,7 +94,7 @@ func (h *Holder) uncheckedLines(now time.Time) []StalledLine { if h.deliveries[id] != nil || now.Sub(u.first) < UncheckedAfter { continue } - out = append(out, StalledLine{ID: id, State: Unannounced, For: now.Sub(u.first).Round(time.Second).String(), + out = append(out, StalledLine{ID: id, Number: u.pull.Number, State: Unannounced, For: now.Sub(u.first).Round(time.Second).String(), Bound: UncheckedAfter.String(), H2: "none: the forge never announced it, so there is no delivery to close — the operator's", Says: fmt.Sprintf("%s/%s#%d is open on %s, which requires the merge check, and its head has had no merge "+ diff --git a/modules/mesh-delivery/cmd/mesh-delivery/unchecked_test.go b/modules/mesh-delivery/cmd/mesh-delivery/unchecked_test.go index 992224df..c1ce9718 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/unchecked_test.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/unchecked_test.go @@ -31,6 +31,9 @@ func TestAPullRequestNobodyCheckedIsAStalledDelivery(t *testing.T) { !strings.Contains(lines[0].Says, "no merge check") || !strings.HasPrefix(lines[0].H2, "none") { t.Fatalf("an unchecked pull request on a base requiring only mesh/repo-check reads %+v", lines) } + if lines[0].Number != 243 { + t.Fatalf("the line does not name the pull request's number: %+v", lines[0]) + } if lines[0].For != "11m0s" { t.Fatalf("its time is not counted from when this owner first saw it: %s", lines[0].For) } diff --git a/modules/mesh-delivery/cmd/mesh-delivery/verbs.go b/modules/mesh-delivery/cmd/mesh-delivery/verbs.go index f161d41d..327f881c 100644 --- a/modules/mesh-delivery/cmd/mesh-delivery/verbs.go +++ b/modules/mesh-delivery/cmd/mesh-delivery/verbs.go @@ -152,12 +152,14 @@ func (h *Holder) Groups(all bool) []GroupLine { // StalledLine is one delivery past its state's bound. type StalledLine struct { - ID string `json:"id"` - State State `json:"state"` - For string `json:"for"` - Bound string `json:"bound"` - H2 string `json:"h2"` - Says string `json:"says"` + ID string `json:"id"` + // Number is the pull request's, for a head the forge never announced: the condition names it (novox/hq issue 347). + Number int `json:"number,omitempty"` + State State `json:"state"` + 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`.