Find a rechecked pull request's group by its repository and number (issue 867, ADR 0382 §1)
mesh/merge-gate head de5292323f33 merged into trunk a47976be4e69 — pass: builds mesh-controller → novox; no bus step; every machine composes with the chang…
mesh/repo-check head de5292323f33 merged into trunk a47976be4e69 — pass: its merge-check.sh passed
mesh/delivery delivered

A recheck rebuilds the pull request without its head branch name, so the sibling lookup found no group and said nothing: mesh-host#114's recheck was judged without its sibling. With no branch name, the group is the one whose member_details hold the pull request; an older mesh-delivery says the siblings could not be learned. TestReplay867Recheck replays it.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-10-16 00:13:06 +00:00
co-authored by Claude
parent a47976be4e
commit de5292323f
4 changed files with 63 additions and 15 deletions
+15 -3
View File
@@ -34,7 +34,13 @@ import (
// It runs the whole path: the forge announces each pull request (following.PullUpdated), the controller asks
// mesh-delivery which pull requests the group holds, the ask is queued for the build seat, and the build seat's check
// (builder.Check, with a container runtime that runs each container's command on this machine) judges it.
func TestReplay867(t *testing.T) {
func TestReplay867(t *testing.T) { replay867(t, false) }
// TestReplay867Recheck is the same pair re-checked through mesh-delivery (`delivery check` with one member): the forge's
// announcement is not repeated, so the pull request reaches the controller without its head branch name.
func TestReplay867Recheck(t *testing.T) { replay867(t, true) }
func replay867(t *testing.T, recheck bool) {
if _, err := exec.LookPath("go"); err != nil {
t.Skip("no Go toolchain on this machine to build a judge with")
}
@@ -46,7 +52,7 @@ func TestReplay867(t *testing.T) {
module string
}{{"the node-engine change", "mesh-host", 114, r.hostHead, "mesh-host"},
{"the controller change", "mesh-controller", 346, r.controllerHead, "mesh-controller"}} {
v := r.checked(t, c.repo, c.number, c.head)
v := r.checked(t, c.repo, c.number, c.head, recheck)
if v.Gate == nil || v.Gate.Verdict != "pass" || v.Repo == nil || v.Repo.Verdict != "pass" {
t.Errorf("%s (%s#%d) did not pass its own merge check beside its group: gate %+v, repository %+v\n%s",
c.what, c.repo, c.number, v.Gate, v.Repo, v.Report)
@@ -179,7 +185,7 @@ func theGroupOfIssue867(t *testing.T) *theIssue867 {
}
// checked is a pull request announced by the forge, asked of the build seat by the controller, and checked there.
func (r *theIssue867) checked(t *testing.T, repo string, number int, head string) builderVerdict {
func (r *theIssue867) checked(t *testing.T, repo string, number int, head string, recheck bool) builderVerdict {
t.Helper()
js, ask := aBuildQueue(t)
_ = ask
@@ -188,6 +194,12 @@ func (r *theIssue867) checked(t *testing.T, repo string, number int, head string
p := link.PullUpdated{Owner: "novox", Repo: repo, Number: number, Base: "main", Head: "feat/867", Commit: head,
Paths: []string{"lock.txt", "validate/more.go", "cmd/mesh-controller/main.go"}, ModuleDirsSaid: true,
MergeCheck: true, MergeCheckSaid: true}
if recheck {
// As `delivery check --members <one head>` builds it from mesh-delivery's member: no head branch name.
p = orderMember{ID: "novox/" + repo + "@" + head[:12], Repository: "novox/" + repo, Base: "main", Head: head,
Number: number, Paths: p.Paths, ModuleDirsSaid: true}.pull()
p.MergeCheck, p.MergeCheckSaid = true, true
}
if err := (following{open: r.open, oneShot: true}).PullUpdated(t.Context(), p); err != nil {
t.Fatal(err)
}