Say an unanswered merge check in its own words, with no action it cannot take (issue 438) #213

Merged
mesh-admin merged 2 commits from fix/438-a-check-that-never-answered-is-said into main 2026-10-11 00:47:11 +00:00
2 changed files with 7 additions and 8 deletions
Showing only changes of commit 671e350f56 - Show all commits
+4 -4
View File
@@ -863,7 +863,7 @@ func stalledWords(l stalledLine, o conditions.Observation) (headline, explanatio
// unansweredWords are the plain words of a pull request's head whose merge check was asked and has not answered
// within its bound (novox/hq issue 438): mesh-delivery holds no delivery of it, so there is nothing to stop, release
// or close, and no action is offered. The operator's acts are a new commit, which asks the check again, or a look
// at the build seat's queue, where a check that never ran may still wait.
// at the build queue, where a check that never ran may still wait.
func unansweredWords(l stalledLine, o conditions.Observation) (headline, explanation, resolved, needs string,
actions []conditions.Action) {
repository, _, _ := strings.Cut(l.ID, "@")
@@ -883,10 +883,10 @@ func unansweredWords(l stalledLine, o conditions.Observation) (headline, explana
which = "Its merge check (" + strings.Join(l.Waiting, ", ") + ")"
}
if o.Resolver == conditions.ResolverOperator {
needs = "push a new commit to its branch, which asks the check again, or see whether the check still waits " +
"in the build seat's queue: mesh-controller.queue."
needs = "push a new commit to its branch, which asks the check again, or see whether its check still waits " +
"in the build queue: mesh-controller.queue."
}
return fmt.Sprintf("%s has a merge check that has not answered %s", pull, long),
return fmt.Sprintf("%s's merge check has not answered %s", pull, long),
fmt.Sprintf("%s is open on a branch that requires the merge check. %s was asked and has not answered %s%s. "+
"It cannot merge until its check answers.", pull, which, long, limit),
fmt.Sprintf("%s has an answer from its merge check, or is closed", pull), needs, nil
+3 -4
View File
@@ -352,7 +352,7 @@ func TestAnUnannouncedPullRequestSaysToPushANewCommit(t *testing.T) {
// **A pull request whose merge check never answered says which check, since when, and what to do** (novox/hq issue
// 438): mesh-delivery says one as a stalled line in state `unanswered`, the line below exactly as its test makes it.
// No delivery of the head is held, so there is nothing to stop, release or close: no action is offered, and the
// operator's acts are a new commit, which asks the check again, or a look at the build seat's queue.
// operator's acts are a new commit, which asks the check again, or a look at the build queue.
func TestAnUnansweredMergeCheckSaysWhichCheckAndWhatToDo(t *testing.T) {
var l stalledLine
if err := json.Unmarshal([]byte(`{"id":"novox/mesh-controller@c11222026a3b","number":212,"state":"unanswered",`+
@@ -374,11 +374,10 @@ func TestAnUnansweredMergeCheckSaysWhichCheckAndWhatToDo(t *testing.T) {
t.Fatalf("it offers an action a head with no delivery cannot take: %+v", o.Actions)
}
if strings.Contains(o.Needs, "stop") || strings.Contains(o.Needs, "release") || !strings.Contains(o.Needs, "commit") ||
!strings.Contains(o.Needs, "mesh-controller.queue") {
!strings.Contains(o.Needs, "in the build queue: mesh-controller.queue") || strings.Contains(o.Needs, "build seat") {
t.Fatalf("it says to %q", o.Needs)
}
if !strings.Contains(o.Headline, "#212") || !strings.Contains(o.Headline, "merge check") ||
strings.Contains(o.Headline, "Delivery of") {
if o.Headline != "Pull request mesh-controller #212's merge check has not answered for 61 minutes" {
t.Fatalf("its headline reads %q", o.Headline)
}
for _, want := range []string{"mesh/merge-gate pending since 2026-10-11T00:11:39Z", "mesh/repo-check never set",