From 510c91f1449caa92a9fc230bde2b52420313b3a8 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Oct 2026 13:15:20 +0200 Subject: [PATCH 1/2] Say a pull request the forge never announced as one, with what to do (hq issue 347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mesh-delivery now says a pull request on a base that requires the merge check, with none on its head for ten minutes, as a stalled line in state unannounced, which D14 raises as delivery..stalled. No delivery exists for it, so the generic words — stop it, release it — named an act that does not apply. It now says the pull request has had no merge check, why, and that a new commit on its branch is announced and checked. --- cmd/mesh-controller/plain_words.go | 16 ++++++++++++++++ cmd/mesh-controller/plain_words_test.go | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/cmd/mesh-controller/plain_words.go b/cmd/mesh-controller/plain_words.go index 61cab51d..0599d6f2 100644 --- a/cmd/mesh-controller/plain_words.go +++ b/cmd/mesh-controller/plain_words.go @@ -748,6 +748,22 @@ func stalledWords(l stalledLine, o conditions.Observation) (headline, explanatio actions []conditions.Action) { repository, _, _ := strings.Cut(l.ID, "@") name := repoName(repository) + if l.State == "unannounced" { + // A pull request the forge never announced (novox/hq issue 347): no delivery exists, so there is nothing to + // stop, release or close; a new commit on its branch is announced and checked. + long := "for too long" + if d, err := time.ParseDuration(l.For); err == nil { + long = "for " + humanDuration(d) + } + if o.Resolver == conditions.ResolverOperator { + needs = "push a new commit to its branch; the forge announces it and the mesh checks it." + } + return fmt.Sprintf("A pull request of %s has had no merge check %s", name, long), + fmt.Sprintf("A pull request of %s has been open %s on a branch that requires the merge check, and the "+ + "mesh was never asked to check it: the forge never announced it. It cannot merge until it is checked.", + name, long), + fmt.Sprintf("The pull request of %s has a merge check now, or is closed", name), needs, nil + } held := l.State if held == "" { held = "held" diff --git a/cmd/mesh-controller/plain_words_test.go b/cmd/mesh-controller/plain_words_test.go index c0626897..41665ee2 100644 --- a/cmd/mesh-controller/plain_words_test.go +++ b/cmd/mesh-controller/plain_words_test.go @@ -309,3 +309,23 @@ func TestANeedNoNotificationAnswersNamesTheMeshMCPServer(t *testing.T) { } check("updates held", releaseHeldWords([]string{"openrazer"}, []string{"g14"})) } + +// **A pull request the forge never announced says what to do about it** (novox/hq issue 347): mesh-delivery says one +// as a stalled line in state `unannounced` — no delivery exists, so there is nothing to stop, release or close — +// and the operator's one act is a new commit on its branch, which the forge announces. +func TestAnUnannouncedPullRequestSaysToPushANewCommit(t *testing.T) { + l := stalledLine{ID: "novox/hq@bfe82315f42c", State: "unannounced", For: "11m0s", Bound: "10m0s", + H2: "none: the forge never announced it, so there is no delivery to close — the operator's", + Says: "novox/hq#243 is open on main, which requires the merge check, and its head has had no merge check"} + obs := stalledObservations([]stalledLine{l}) + if len(obs) != 1 || obs[0].Resolver != conditions.ResolverOperator { + t.Fatalf("an unannounced pull request is not the operator's: %+v", obs) + } + o := obs[0] + if strings.Contains(o.Needs, "stop") || strings.Contains(o.Needs, "release") || !strings.Contains(o.Needs, "commit") { + t.Fatalf("it says to %q", o.Needs) + } + if !strings.Contains(o.Headline, "no merge check") || !strings.Contains(o.Explanation, "never") { + t.Fatalf("it reads %q / %q", o.Headline, o.Explanation) + } +} From 14ab2ddd9b49dbcc34e35f941e4980d3d1faaf14 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Oct 2026 13:22:22 +0200 Subject: [PATCH 2/2] Announce this head: the pull request was opened after its push, which the announcer misses (hq issue 347)