diff --git a/modules/mesh-delivery-pipeline/manifest_test.go b/modules/mesh-delivery-pipeline/manifest_test.go index 76a9cc5f..784a16b3 100644 --- a/modules/mesh-delivery-pipeline/manifest_test.go +++ b/modules/mesh-delivery-pipeline/manifest_test.go @@ -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 "" diff --git a/modules/mesh-delivery-pipeline/module.json b/modules/mesh-delivery-pipeline/module.json index 98214688..5a61a86c 100644 --- a/modules/mesh-delivery-pipeline/module.json +++ b/modules/mesh-delivery-pipeline/module.json @@ -180,8 +180,7 @@ }, "user": "mesh-delivery-pipeline", "health": { - "kind": "tool", - "tool": "runner_health" + "kind": "unit" } } ],