Format PullUpdated, and keep the announced base head on a rechecked member
mesh/merge-gate pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without …
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group feat/341-a-merge-check-judges-the-merge delivered: every member is delivered
mesh/merge-gate pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without …
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group feat/341-a-merge-check-judges-the-merge delivered: every member is delivered
A head checked again through mesh-delivery reached the direct verdict with no base head, so a head no build judges was answered with no trunk commit and the merge tool would refuse it (novox/hq ADR 0323).
This commit is contained in:
@@ -278,3 +278,13 @@ func TestADirectVerdictNamesTheTrunkTheForgeAnnounced(t *testing.T) {
|
|||||||
t.Fatalf("a forge that said no base head gave the trunk %q", c.Trunk)
|
t.Fatalf("a forge that said no base head gave the trunk %q", c.Trunk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A head checked again through mesh-delivery (`delivery check --members`, a recheck) reaches the same direct verdict:
|
||||||
|
// it names the base head the forge last announced, kept on the member, or the merge tool would refuse it for ever.
|
||||||
|
func TestARecheckedHeadsDirectVerdictNamesItsTrunk(t *testing.T) {
|
||||||
|
m := orderMember{ID: "novox/mesh-tools-go@1a2b3c4d5e6f", Repository: "novox/mesh-tools-go", Base: "main",
|
||||||
|
Head: "1a2b3c4d5e6f7a8b9c0d", Number: 3, BaseSHA: "7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b"}
|
||||||
|
if c := directVerdict(m.pull(), link.ChangePlan{}); c.Trunk != "7a8b9c0d1e2f" {
|
||||||
|
t.Fatalf("a rechecked head's direct verdict names trunk %q", c.Trunk)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -580,6 +580,9 @@ type orderMember struct {
|
|||||||
CloneURL string `json:"clone_url,omitempty"`
|
CloneURL string `json:"clone_url,omitempty"`
|
||||||
// After are the repositories its pull request says it goes after (`after: <repository>`).
|
// After are the repositories its pull request says it goes after (`after: <repository>`).
|
||||||
After []string `json:"after,omitempty"`
|
After []string `json:"after,omitempty"`
|
||||||
|
// BaseSHA is the base branch's head the forge last announced the head with (novox/hq ADR 0323): the trunk commit
|
||||||
|
// a verdict no build judges names when the head is checked again through mesh-delivery.
|
||||||
|
BaseSHA string `json:"base_sha,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// pull is the member as the forge announced it.
|
// pull is the member as the forge announced it.
|
||||||
@@ -589,7 +592,7 @@ func (m orderMember) pull() link.PullUpdated {
|
|||||||
if base == "" {
|
if base == "" {
|
||||||
base = "main"
|
base = "main"
|
||||||
}
|
}
|
||||||
return link.PullUpdated{Owner: owner, Repo: repo, Number: m.Number, Base: base, Commit: m.Head,
|
return link.PullUpdated{Owner: owner, Repo: repo, Number: m.Number, Base: base, Commit: m.Head, BaseSHA: m.BaseSHA,
|
||||||
CloneURL: m.CloneURL, Paths: m.Paths, PathsTruncated: m.PathsTruncated, Removed: m.Removed,
|
CloneURL: m.CloneURL, Paths: m.Paths, PathsTruncated: m.PathsTruncated, Removed: m.Removed,
|
||||||
ModuleDirs: m.ModuleDirs, ModuleDirsSaid: m.ModuleDirsSaid}
|
ModuleDirs: m.ModuleDirs, ModuleDirsSaid: m.ModuleDirsSaid}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user