B5 (H-A-435 second addendum): the builder's process health stays kind unit, builder_health a tool beside it
A tool-only health is refused by the validator (ADR 0227 rule 8, ADR 0240 rule 2), as the runner's manifest has it: the unit check stays, the tool reads the consumers beside it. Builds: design 47 H2 §794; H-A-435 second addendum
This commit is contained in:
@@ -244,9 +244,10 @@ func TestManifestProcess(t *testing.T) { // 1607/AC1
|
||||
if p["artifact"] != "program" || !reflect.DeepEqual(p["run"], []any{"./mesh-delivery-builder"}) {
|
||||
t.Errorf("process = %v", p)
|
||||
}
|
||||
// Design 47 H2 §794, H-A-435: the health asks builder_health, which names a consumer behind by five minutes.
|
||||
if h, _ := p["health"].(map[string]any); h["kind"] != "tool" || h["tool"] != "builder_health" {
|
||||
t.Errorf("health = %v, want the tool builder_health", p["health"])
|
||||
// Design 47 H2 §794, H-A-435 (second addendum): the process's health stays kind unit, builder_health a tool beside it (a
|
||||
// tool-only health is refused, ADR 0227 rule 8, ADR 0240 rule 2).
|
||||
if h, _ := p["health"].(map[string]any); h["kind"] != "unit" || len(h) != 1 {
|
||||
t.Errorf("health = %v, want kind unit alone", p["health"])
|
||||
}
|
||||
env, _ := p["env"].(map[string]any)
|
||||
if len(env) != 8 || env["MESH_BUILDER_REVISION_WAIT_FILE"] != "${dir:state}/revision-wait-minutes" || env["MESH_BUILDER_PACKAGE_WAIT_FILE"] != "${dir:state}/package-wait-minutes" || env["MESH_BUILDER_PUBLISH_TRIES_FILE"] != "${dir:state}/publish-tries" || env["MESH_BROKER_FILE"] != "${dir:state}/broker" || env["MESH_BUILDER_TOOLCHAIN_WAIT_FILE"] != "${dir:state}/toolchain-wait-minutes" {
|
||||
|
||||
@@ -346,8 +346,7 @@
|
||||
},
|
||||
"user": "mesh-delivery-builder",
|
||||
"health": {
|
||||
"kind": "tool",
|
||||
"tool": "builder_health"
|
||||
"kind": "unit"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user