mesh/repo-check head 06e6721ed677 merged into trunk 7412c5b6c9c5 beside mesh-catalog#380@cf5c0273 — pass: its merge-check.sh passed
mesh/merge-gate head 06e6721ed677 merged into trunk 7412c5b6c9c5 — pass: group feat/r3e-the-gate composed: every machine composes with the change as it did…
mesh/delivery covered after its failure: a later walk that contains it was delivered: plan-1792478961597980735 (novox/mesh-tools at f183b86f into main, d…
mesh/delivery-group group feat/r3e-the-gate delivered: every member is delivered
42 lines
1.4 KiB
Go
42 lines
1.4 KiB
Go
package console
|
|
|
|
import (
|
|
"encoding/json"
|
|
"os"
|
|
"reflect"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// novox/hq ADR 0367 §5: the tool runner's manifest names the families a session waits on today, one by one,
|
|
// and the asker's `decided` for the claude-code module alone. Adding one is a reviewed change to this file
|
|
// (§6), so this list changes with it. The delivery's transitions are waited on under today's module's name and the gate's that
|
|
// takes its place (ADR 0450 §8, issue 1350); the old name goes when today's module is forgotten.
|
|
func TestTheManifestNamesTheFirstFamiliesOneByOne(t *testing.T) {
|
|
raw, err := os.ReadFile("../../module.json")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
var m struct {
|
|
Module string `json:"module"`
|
|
Waits []string `json:"waits"`
|
|
Consumes []string `json:"consumes"`
|
|
}
|
|
if err := json.Unmarshal(raw, &m); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
want := []string{"mesh-knowledge.reviewed", "mesh-delivery.transition", "mesh-delivery-gate.transition", "gitea.forge.status",
|
|
"mesh-controller.checked", "operator-channel.decided.claude-code"}
|
|
if m.Module != "node-tools" || !reflect.DeepEqual(m.Waits, want) {
|
|
t.Errorf("%s waits on %v, want %v", m.Module, m.Waits, want)
|
|
}
|
|
for _, w := range m.Waits {
|
|
if strings.ContainsAny(w, "*>") {
|
|
t.Errorf("a family named by a wildcard: %s", w)
|
|
}
|
|
}
|
|
if len(m.Consumes) > 0 {
|
|
t.Errorf("the tool runner consumes %v: a wait is no consumer (ADR 0367 §2)", m.Consumes)
|
|
}
|
|
}
|