mesh-issues: the removed controller is no registered owner and no core owner; old issues keep what they name (issue 1126)
Claude-Session: https://claude.ai/code/session_01JG73KG7AfSdh6FP8VrBqCn
This commit is contained in:
@@ -364,7 +364,7 @@ said (hq issue 483).
|
|||||||
```
|
```
|
||||||
{
|
{
|
||||||
"first-number": 365,
|
"first-number": 365,
|
||||||
"owners": ["hq", "mesh-catalog", "mesh-catalog modules/nats", "mesh-controller", …]
|
"owners": ["hq", "mesh-catalog", "mesh-catalog modules/nats", "mesh-host", …]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ func (i *instance) call(verb string, args map[string]any) (json.RawMessage, erro
|
|||||||
func writeSettings(t *testing.T, first int) string {
|
func writeSettings(t *testing.T, first int) string {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
path := filepath.Join(t.TempDir(), "settings.json")
|
path := filepath.Join(t.TempDir(), "settings.json")
|
||||||
raw, _ := json.Marshal(map[string]any{"first-number": first, "owners": []string{"hq", "mesh-controller"}})
|
raw, _ := json.Marshal(map[string]any{"first-number": first, "owners": []string{"hq", "mesh-sdk"}})
|
||||||
if err := os.WriteFile(path, raw, 0o600); err != nil {
|
if err := os.WriteFile(path, raw, 0o600); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -647,15 +647,15 @@ func TestAnIssueIsOpenedNotedLinkedMovedAndListedOverTheBus(t *testing.T) {
|
|||||||
}
|
}
|
||||||
must(i.call("note", map[string]any{"number": 365, "text": "found in the gate's plan"}))
|
must(i.call("note", map[string]any{"number": 365, "text": "found in the gate's plan"}))
|
||||||
must(i.call("link", map[string]any{"number": 365, "kind": "decision", "target": "0237"}))
|
must(i.call("link", map[string]any{"number": 365, "kind": "decision", "target": "0237"}))
|
||||||
if _, err := i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-controller#300"}}); err == nil {
|
if _, err := i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-sdk#300"}}); err == nil {
|
||||||
t.Fatal("resolved without located-in")
|
t.Fatal("resolved without located-in")
|
||||||
}
|
}
|
||||||
must(i.call("move", map[string]any{"number": 365, "status": "located", "located-in": []string{"mesh-controller internal/gate"}}))
|
must(i.call("move", map[string]any{"number": 365, "status": "located", "located-in": []string{"mesh-sdk internal/gate"}}))
|
||||||
must(i.call("move", map[string]any{"number": 365, "status": "fixing", "by": "fix-365@g14"}))
|
must(i.call("move", map[string]any{"number": 365, "status": "fixing", "by": "fix-365@g14"}))
|
||||||
if _, err := i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-controller#300"}}); err == nil {
|
if _, err := i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-sdk#300"}}); err == nil {
|
||||||
t.Fatal("a core issue resolved without a replay")
|
t.Fatal("a core issue resolved without a replay")
|
||||||
}
|
}
|
||||||
must(i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-controller#300"}, "replay": "R365"}))
|
must(i.call("move", map[string]any{"number": 365, "status": "resolved", "fixed-by": []string{"mesh-sdk#300"}, "replay": "R365"}))
|
||||||
var is Issue
|
var is Issue
|
||||||
_ = json.Unmarshal(must(i.call("get", map[string]any{"number": 365})), &is)
|
_ = json.Unmarshal(must(i.call("get", map[string]any{"number": 365})), &is)
|
||||||
if is.Status != StatusResolved || len(is.Notes) != 1 || len(is.Links) != 1 || is.Replay != "R365" || is.Closed == nil {
|
if is.Status != StatusResolved || len(is.Notes) != 1 || len(is.Links) != 1 || is.Replay != "R365" || is.Closed == nil {
|
||||||
|
|||||||
@@ -173,10 +173,10 @@ func (o Owners) locatedIn(e string) (string, error) {
|
|||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// core is an owner whose issues are core issues (hq cycle.py, to-be 45): the controller, the node-engine,
|
// core is an owner whose issues are core issues (hq cycle.py, to-be 45): the node-engine,
|
||||||
// the tool runner and the console, the SDK, the delivery parts, and the catalogue's bus, forge and build modules
|
// the tool runner and the console, the SDK, the delivery parts, and the catalogue's bus, forge and build modules
|
||||||
// (issue 1041; ADR 0524 §5).
|
// (issue 1041; ADR 0524 §5).
|
||||||
var core = regexp.MustCompile(`\b(mesh-controller|mesh-host|mesh-tools|mesh-sdk|node-tools|mesh-delivery|` +
|
var core = regexp.MustCompile(`\b(mesh-host|mesh-tools|mesh-sdk|node-tools|mesh-delivery|` +
|
||||||
`mesh-build-(go|node|image)|mesh-catalog\s+modules/(nats|gitea))\b`)
|
`mesh-build-(go|node|image)|mesh-catalog\s+modules/(nats|gitea))\b`)
|
||||||
|
|
||||||
// IsCore says whether an issue located in these owners is a core issue (ADR 0237).
|
// IsCore says whether an issue located in these owners is a core issue (ADR 0237).
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ func TestIsCoreNamesTheBuildModulesAndTheDeliveryParts(t *testing.T) {
|
|||||||
"mesh-catalog modules/mesh-build-go", "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-build-image",
|
"mesh-catalog modules/mesh-build-go", "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-build-image",
|
||||||
"mesh-catalog modules/mesh-build-go/cmd/mesh-build-go",
|
"mesh-catalog modules/mesh-build-go/cmd/mesh-build-go",
|
||||||
"mesh-delivery", "mesh-delivery modules/mesh-delivery-checker", "mesh-catalog modules/mesh-delivery-gate",
|
"mesh-delivery", "mesh-delivery modules/mesh-delivery-checker", "mesh-catalog modules/mesh-delivery-gate",
|
||||||
"mesh-catalog modules/nats", "mesh-catalog modules/gitea", "mesh-controller",
|
"mesh-catalog modules/nats", "mesh-catalog modules/gitea", "mesh-sdk",
|
||||||
} {
|
} {
|
||||||
if !IsCore([]string{e}) {
|
if !IsCore([]string{e}) {
|
||||||
t.Errorf("an issue located in %q is not core", e)
|
t.Errorf("an issue located in %q is not core", e)
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ func TestTheSettingsStartTheCounterAndRegisterTheOwners(t *testing.T) {
|
|||||||
t.Error("the owners are not sorted")
|
t.Error("the owners are not sorted")
|
||||||
}
|
}
|
||||||
// 1133/AC1: the repository mesh-delivery is registered, so an issue can be located in it.
|
// 1133/AC1: the repository mesh-delivery is registered, so an issue can be located in it.
|
||||||
for _, repo := range []string{"hq", "mesh-catalog", "mesh-controller", "mesh-delivery", "mesh-host", "mesh-sdk", "mesh-tools"} {
|
for _, repo := range []string{"hq", "mesh-catalog", "mesh-delivery", "mesh-host", "mesh-sdk", "mesh-tools"} {
|
||||||
if Owners(s.Owners).owns(repo) != repo {
|
if Owners(s.Owners).owns(repo) != repo {
|
||||||
t.Errorf("%s is not registered", repo)
|
t.Errorf("%s is not registered", repo)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ func TestTheCyclesRulesHoldAtTheWrite(t *testing.T) {
|
|||||||
{"resolved from open", []string{"hq"}, "", MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
{"resolved from open", []string{"hq"}, "", MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
||||||
{"resolved from located", []string{"hq"}, StatusLocated, MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
{"resolved from located", []string{"hq"}, StatusLocated, MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
||||||
{"resolved from diagnosing", []string{"hq"}, StatusDiagnosing, MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
{"resolved from diagnosing", []string{"hq"}, StatusDiagnosing, MoveAsk{Status: StatusResolved, FixedBy: []string{"hq#280"}}, "only from fixing"},
|
||||||
{"a core issue resolved without a replay", []string{"mesh-controller"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-controller#9"}}, "core issue"},
|
{"a core issue resolved without a replay", []string{"mesh-sdk"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-sdk#9"}}, "core issue"},
|
||||||
{"a core issue in the bus resolved without a replay", []string{"mesh-catalog modules/nats"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-catalog#9"}}, "core issue"},
|
{"a core issue in the bus resolved without a replay", []string{"mesh-catalog modules/nats"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-catalog#9"}}, "core issue"},
|
||||||
{"a core issue resolved with a replay", []string{"mesh-tools node-tools/internal/bus"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-tools#25"}, Replay: "R361"}, ""},
|
{"a core issue resolved with a replay", []string{"mesh-tools node-tools/internal/bus"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-tools#25"}, Replay: "R361"}, ""},
|
||||||
{"a core issue resolved with replay-none", []string{"mesh-sdk"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-sdk#16"}, ReplayNone: "it needs two machines"}, ""},
|
{"a core issue resolved with replay-none", []string{"mesh-sdk"}, fx, MoveAsk{Status: StatusResolved, FixedBy: []string{"mesh-sdk#16"}, ReplayNone: "it needs two machines"}, ""},
|
||||||
|
|||||||
@@ -144,8 +144,6 @@
|
|||||||
"mesh-catalog modules/zsh",
|
"mesh-catalog modules/zsh",
|
||||||
"mesh-catalog modules/zsh-autosuggestions",
|
"mesh-catalog modules/zsh-autosuggestions",
|
||||||
"mesh-catalog modules/zsh-syntax-highlighting",
|
"mesh-catalog modules/zsh-syntax-highlighting",
|
||||||
"mesh-controller",
|
|
||||||
"mesh-controller modules/route-proxy",
|
|
||||||
"mesh-delivery",
|
"mesh-delivery",
|
||||||
"mesh-delivery modules/mesh-delivery-builder",
|
"mesh-delivery modules/mesh-delivery-builder",
|
||||||
"mesh-delivery modules/mesh-delivery-checker",
|
"mesh-delivery modules/mesh-delivery-checker",
|
||||||
|
|||||||
@@ -256,8 +256,6 @@
|
|||||||
"mesh-catalog modules/zsh",
|
"mesh-catalog modules/zsh",
|
||||||
"mesh-catalog modules/zsh-autosuggestions",
|
"mesh-catalog modules/zsh-autosuggestions",
|
||||||
"mesh-catalog modules/zsh-syntax-highlighting",
|
"mesh-catalog modules/zsh-syntax-highlighting",
|
||||||
"mesh-controller",
|
|
||||||
"mesh-controller modules/route-proxy",
|
|
||||||
"mesh-delivery",
|
"mesh-delivery",
|
||||||
"mesh-delivery modules/mesh-delivery-builder",
|
"mesh-delivery modules/mesh-delivery-builder",
|
||||||
"mesh-delivery modules/mesh-delivery-checker",
|
"mesh-delivery modules/mesh-delivery-checker",
|
||||||
|
|||||||
Reference in New Issue
Block a user