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 merged: every member is merged
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 merged: every member is merged
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:
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@@ -65,6 +66,11 @@ func TestAHeadWhoseCheckStartedAndNeverAnsweredIsSaid(t *testing.T) {
|
|||||||
t.Fatalf("the line does not say %q: %s", want, l.Says)
|
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") {
|
if strings.Contains(l.Says, "mesh/delivery") {
|
||||||
t.Fatalf("the line names a status that is not the merge check: %s", l.Says)
|
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 "+
|
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",
|
"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)
|
u.pull.Owner, u.pull.Repo, u.pull.Number, u.pull.Base)
|
||||||
state := Unannounced
|
state, waiting := Unannounced, []string(nil)
|
||||||
if u.started() {
|
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 "+
|
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 "+
|
"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,
|
"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(),
|
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(),
|
Bound: u.bound().String(),
|
||||||
H2: h2, Says: says})
|
H2: h2, Says: says, Waiting: waiting})
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,11 +170,15 @@ type StalledLine struct {
|
|||||||
Number int `json:"number,omitempty"`
|
Number int `json:"number,omitempty"`
|
||||||
State State `json:"state"`
|
State State `json:"state"`
|
||||||
// Walk is the walk a line of the state Unheld is about (novox/hq issue 362).
|
// Walk is the walk a line of the state Unheld is about (novox/hq issue 362).
|
||||||
Walk string `json:"walk,omitempty"`
|
Walk string `json:"walk,omitempty"`
|
||||||
For string `json:"for"`
|
// Waiting are the merge checks a line of the state Unanswered waits on, each as it reads — "mesh/repo-check
|
||||||
Bound string `json:"bound"`
|
// never set", "mesh/merge-gate pending since <UTC time>" — so the controller's words name them without reading
|
||||||
H2 string `json:"h2"`
|
// Says (novox/hq issue 438).
|
||||||
Says string `json:"says"`
|
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`.
|
// Stalled is the `stalled` verb: what the controller's self-check raises as `delivery.<id>.stalled`.
|
||||||
|
|||||||
Reference in New Issue
Block a user