Milestone 47 G: mesh-catalog's part of the one release #677

Merged
mesh-tools merged 276 commits from feat/47-G-join12 into main 2026-11-13 13:08:21 +00:00
Showing only changes of commit 579cd33cd5 - Show all commits
@@ -16,6 +16,7 @@ import (
"os"
"os/exec"
"reflect"
"strconv"
"strings"
"sync"
"testing"
@@ -697,7 +698,7 @@ func TestAPassingVerdictAsksTheApproveAndItsApproveMergesWithinSecondsOverARealB
var d Delivery
return err == nil && json.Unmarshal(e.Value(), &d) == nil && d.State == Merged
})
if n := len(rt2.mergesSaid()); n != 0 || len(onlyAskKeys(b)) > 1 {
if n := len(rt2.mergesSaid()); n != merges || len(onlyAskKeys(b)) > 1 {
t.Fatalf("the restarted gate said the merge %d more times (%d before), or asked again: %v", n, merges, onlyAskKeys(b))
}
// Quiet follows: nothing asks the forge or the controller again with no event to say so.
@@ -908,3 +909,25 @@ func mustDecode[T any](t *testing.T, raw []byte) T {
// (issue 1404). A failed first ask is asked again only after askAgainAfter (30 s, react.go), and 20 s deliberately does not
// cover that: a failed first ask still fails the test.
const eventWithin = 20 * time.Second
// mergesSaid are the writes of the gate's state merges, the merges it handed to the forge bridge, in order (the old form of
// the merge: eb131beb, the merge as an owed act, is left out of the join).
func (r *runtime) mergesSaid() []string {
ctx := context.Background()
kv := r.b.kvs["merges"]
keys, err := kv.Keys(ctx)
if err != nil {
return nil
}
var out []string
for _, k := range keys {
hist, err := kv.History(ctx, k)
if err != nil {
continue
}
for _, e := range hist {
out = append(out, k+"@"+strconv.FormatUint(e.Revision(), 10))
}
}
return out
}