Keep what each machine says of what it runs, raise it, and gate on it (hq ADR 0240, to-be 48 Phase A) #107

Merged
mesh-admin merged 2 commits from feat/a-module-says-how-it-is-healthy into main 2026-10-07 00:45:02 +00:00
Showing only changes of commit 725fcd977e - Show all commits
+3 -1
View File
@@ -200,7 +200,9 @@ func judgeHealth(module, component string, m catalogue.Manifest, machine string,
if !onIt {
continue
}
if c.Subject.Scope == conditions.ScopeMachine || slices.Contains(strings.Split(c.Subject.ID, "."), module) {
// A module's own health condition names it whole, its name's dots and all (ADR 0240).
ownHealth := c.Subject.Scope == conditions.ScopeModule && c.Subject.ID == module+"."+machine
if c.Subject.Scope == conditions.ScopeMachine || ownHealth || slices.Contains(strings.Split(c.Subject.ID, "."), module) {
return healthNotYet, fmt.Sprintf("raised since it was sent: %s — %s", c.Key, c.Summary)
}
}