The runner's process is judged by its unit, not by its own tool runner_health
A process is never judged by a tool of its own; the pipeline runner's health is now the unit, as every other process of mesh-delivery declares. runner_health stays a tool. Builds: design 47 G A-305; ADR 0227 rule 8, ADR 0240 rule 2 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
|
||||
@@ -107,8 +108,9 @@ func TestManifest(t *testing.T) {
|
||||
{"uses operator-channel", equalSets(m.Uses, []string{"operator-channel"})},
|
||||
// RN25 (§539): the runner's tools carry the prefix runner_.
|
||||
{"first-view tools", equalSets(m.Tools, []string{"runner_first_views", "runner_first_view_again", "runner_health", "runner_waits", "runner_release", "runner_unlogged", "runner_unlogged_append"})},
|
||||
// RN25 (§468, §76): the health check, run outside the process, is the tool runner_health.
|
||||
{"health is runner_health", healthTool(raw) == "tool runner_health"},
|
||||
// A-305 (ADR 0227 rule 8, ADR 0240 rule 2): the process is judged by its unit, as every process of mesh-delivery,
|
||||
// never by a tool of its own; runner_health stays a tool.
|
||||
{"health is the unit", healthTool(raw) == "unit"},
|
||||
// RN1/AC5 (§95, §130): the new assigner is delivered before the runner.
|
||||
{"program needs the assigner's program", slices.Equal(program.Needs, []string{"mesh-delivery-assigner:program"})},
|
||||
}
|
||||
@@ -145,6 +147,7 @@ func TestNoVerbNamesItsCallers(t *testing.T) {
|
||||
}
|
||||
|
||||
// healthTool is the process resource's health kind and tool.
|
||||
// healthTool is the process's health, its kind and its tool when it names one.
|
||||
func healthTool(raw []byte) string {
|
||||
var m struct {
|
||||
Resources []struct {
|
||||
@@ -160,7 +163,7 @@ func healthTool(raw []byte) string {
|
||||
}
|
||||
for _, r := range m.Resources {
|
||||
if r.Type == "process" {
|
||||
return r.Health.Kind + " " + r.Health.Tool
|
||||
return strings.TrimSpace(r.Health.Kind + " " + r.Health.Tool)
|
||||
}
|
||||
}
|
||||
return ""
|
||||
|
||||
@@ -180,8 +180,7 @@
|
||||
},
|
||||
"user": "mesh-delivery-pipeline",
|
||||
"health": {
|
||||
"kind": "tool",
|
||||
"tool": "runner_health"
|
||||
"kind": "unit"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user