mesh/merge-gate head 21d038d3397c merged into trunk 5d70eb3e35a9 — pass, with a note: builds mesh-tools, node-tools (+39 dependent(s)) → ace, g14, novox, s…
mesh/repo-check head 21d038d3397c merged into trunk 5d70eb3e35a9 — pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the ch…
mesh/delivery delivered
Closing the console shut its server down with a context that never ends, so a stop or restart of the tool runner waited on any mesh_wait in flight for up to ten minutes. The server's base context is now cancelled first, ending every wait at once, with a five-second shutdown as a backstop (second review of issue 745). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.2 KiB
Go
41 lines
1.2 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.
|
|
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", "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)
|
|
}
|
|
}
|