A group member's own check runs its repository's check alone, a cycle fails the composed check, and mark-ready leaves the delivery seat (issue 977, part D, ADR 0403)

This commit is contained in:
2026-10-17 21:22:55 +02:00
parent 8b3a9163d0
commit aac4bae5a4
14 changed files with 518 additions and 61 deletions
+2 -19
View File
@@ -1,7 +1,8 @@
//go:build integration
package main
import (
"context"
"strings"
"testing"
"time"
@@ -13,24 +14,6 @@ import (
// member still to merge does not close by the merge window, however long that member takes, and a group with a
// member of each kind is one batch whatever order its members are heard in.
// groupStates stubs mesh-delivery's word on one group: its members and their states, which a test changes as the
// members merge.
func groupStates(t *testing.T, head string, states map[string]string) {
t.Helper()
was := deliveryGroupOf
deliveryGroupOf = func(_ context.Context, _ bool, asked string) ([]groupMember, bool, error) {
if asked != head {
return nil, false, nil
}
var members []groupMember
for repository, state := range states {
members = append(members, groupMember{Repository: repository, State: state})
}
return members, true, nil
}
t.Cleanup(func() { deliveryGroupOf = was })
}
func TestAGroupsBatchWaitsForItsLastMemberHoweverLongItTakes(t *testing.T) {
open := windowed(t)
asksWithPaths(t)