Review of issue 977: keep the plan's own order for its gates, hold a group only for a composed mesh-delivery, keep mark-ready one release, compare with the batch's start, fail a lone cycle (issue 977)

This commit is contained in:
2026-10-17 21:37:37 +02:00
parent aac4bae5a4
commit 07b050790e
14 changed files with 259 additions and 24 deletions
+9 -6
View File
@@ -582,8 +582,8 @@ type orderMember struct {
// 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"`
// Ready says the member's pull request is marked ready (novox/hq ADR 0406 §3, issue 974): its check is queued before
// every other check. Said by mesh-delivery on a ready mark.
// Ready says mesh-delivery wants the member's check queued before every other check (novox/hq ADR 0406 §3, issue
// 974). There is no ready mark any more (issue 1022): mesh-delivery says it when it asks for the Approve.
Ready bool `json:"ready,omitempty"`
}
@@ -828,7 +828,7 @@ func deliveryCommand(ctx context.Context, args []string) error {
if err != nil {
return err
}
changes, err := changesOf(ctx, changeSourcesOf(members))
changes, err := changesOf(ctx, changeSourcesOf(members, entries, reachOfMembers(members, entries, read, edges)))
if err != nil {
return fmt.Errorf("what the members say of their manifests cannot be read: %w", err)
}
@@ -1018,8 +1018,8 @@ func theGraph(ctx context.Context, inv *inventory.Inventory) ([]inventory.Entry,
// group's composed check, said without a build. The manifests' change is read from the forge; an answer it cannot give
// is an error, never read as no cycle.
func cycleVerdict(ctx context.Context, group string, members []orderMember, reach map[string]orderReach,
edges []inventory.Edge) (link.Checked, bool, error) {
changes, err := changesOf(ctx, changeSourcesOf(members))
edges []inventory.Edge, entries []inventory.Entry) (link.Checked, bool, error) {
changes, err := changesOf(ctx, changeSourcesOf(members, entries, reach))
if err != nil {
return link.Checked{}, false, fmt.Errorf("what the group's members say of their manifests cannot be read: %w", err)
}
@@ -1036,6 +1036,9 @@ func cycleVerdict(ctx context.Context, group string, members []orderMember, reac
Commit: first.Commit, Verdict: "fail", Summary: said, Report: said, Group: group,
Gate: &link.CheckLayer{Verdict: "fail", Summary: said}}
for _, m := range members {
if group == "" {
break // a lone pull request's verdict names no group and no member
}
p := m.pull()
c.Members = append(c.Members, link.CheckedMember{Owner: p.Owner, Repo: p.Repo, Number: p.Number, Commit: p.Commit,
Trunk: twelve(p.BaseSHA)})
@@ -1075,7 +1078,7 @@ func askGroupCheck(ctx context.Context, open *stores, group string, members []or
reach := reachOfMembers(members, entries, read, edges)
// **A cycle of edges fails the group's composed check, naming every module and edge** (novox/hq ADR 0419 clause 6),
// before the build seat is asked: no composition of the heads has an order to be sent in.
if failing, cyclic, err := cycleVerdict(ctx, group, members, reach, edges); err != nil {
if failing, cyclic, err := cycleVerdict(ctx, group, members, reach, edges, entries); err != nil {
return "", err
} else if cyclic {
sayChecked(ctx, failing)