Say held updates wait because a walk failed, in the glossary's words
The backlog is held after any failed walk, not only a release, and a check is a pull request's status; the words said the last release failed its check.
This commit is contained in:
@@ -667,7 +667,7 @@ func moduleNeeds(node string, rs []inventory.ResourceHealth) string {
|
|||||||
// authorised (to-be 46 phases 5 and 6).
|
// authorised (to-be 46 phases 5 and 6).
|
||||||
const FromMeshMCPServer = "from the mesh MCP server; this notification cannot do it."
|
const FromMeshMCPServer = "from the mesh MCP server; this notification cannot do it."
|
||||||
|
|
||||||
// releaseHeldWords are the plain words of updates held after a release failed its gate: which modules wait,
|
// releaseHeldWords are the plain words of updates held after a walk failed: which modules wait,
|
||||||
// on which machines, and where the operator releases them (ADR 0258: a release is not an acknowledgement, so
|
// on which machines, and where the operator releases them (ADR 0258: a release is not an acknowledgement, so
|
||||||
// no notification gives it). Raised with the modules and machines (backlogObservation); the kind's fallback
|
// no notification gives it). Raised with the modules and machines (backlogObservation); the kind's fallback
|
||||||
// knows neither.
|
// knows neither.
|
||||||
@@ -688,8 +688,8 @@ func releaseHeldWords(modules, machines []string) words {
|
|||||||
}
|
}
|
||||||
return words{Headline: headline,
|
return words{Headline: headline,
|
||||||
Needs: "release them " + FromMeshMCPServer,
|
Needs: "release them " + FromMeshMCPServer,
|
||||||
Explanation: fmt.Sprintf("%s%s wait for a person to release them, because the last release failed its "+
|
Explanation: fmt.Sprintf("%s%s wait for a person to release them, because the last walk failed."+
|
||||||
"check. They are not delivered until then, and stay held if you leave them.", what, where),
|
" They are not delivered until then, and stay held if you leave them.", what, where),
|
||||||
Resolved: "Resolved: the held updates are released"}
|
Resolved: "Resolved: the held updates are released"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -241,10 +241,30 @@ func TestUpdatesHeldNameWhatWaitsAndWhereItIsReleased(t *testing.T) {
|
|||||||
}
|
}
|
||||||
plainExample(t, got[0], "Updates of openrazer and sensors wait for your release",
|
plainExample(t, got[0], "Updates of openrazer and sensors wait for your release",
|
||||||
"Needs you: release them from the mesh MCP server; this notification cannot do it. Updates of openrazer and "+
|
"Needs you: release them from the mesh MCP server; this notification cannot do it. Updates of openrazer and "+
|
||||||
"sensors on g14 and shanks wait for a person to release them, because the last release failed its check. "+
|
"sensors on g14 and shanks wait for a person to release them, because the last walk failed. "+
|
||||||
"They are not delivered until then, and stay held if you leave them.")
|
"They are not delivered until then, and stay held if you leave them.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// **What held them is said in the glossary's words** (2026-10-08 review): the backlog is held after any
|
||||||
|
// walk failed, not a release, and a "check" is a pull request's status. So the words say the walk failed,
|
||||||
|
// and never that a release failed or a check did — with the modules and machines named or not.
|
||||||
|
func TestUpdatesHeldSayTheWalkFailed(t *testing.T) {
|
||||||
|
for _, w := range []words{
|
||||||
|
releaseHeldWords([]string{"openrazer"}, []string{"g14"}),
|
||||||
|
releaseHeldWords(nil, nil),
|
||||||
|
plainWordings["release-held"](conditions.Observation{Scope: conditions.ScopeMesh, ID: "release"}),
|
||||||
|
} {
|
||||||
|
if !strings.Contains(w.Explanation, "because the last walk failed.") {
|
||||||
|
t.Errorf("does not say the walk failed: %q", w.Explanation)
|
||||||
|
}
|
||||||
|
for _, wrong := range []string{"release failed", "check"} {
|
||||||
|
if strings.Contains(w.Explanation, wrong) {
|
||||||
|
t.Errorf("says %q: %q", wrong, w.Explanation)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// mcpVerb is a need that opens with a verb only the mesh MCP server performs (ADR 0258 §1): release, stop,
|
// mcpVerb is a need that opens with a verb only the mesh MCP server performs (ADR 0258 §1): release, stop,
|
||||||
// start, restart, and a restore.
|
// start, restart, and a restore.
|
||||||
var mcpVerb = regexp.MustCompile(`^(release|stop|start|restart|restore)\b`)
|
var mcpVerb = regexp.MustCompile(`^(release|stop|start|restart|restore)\b`)
|
||||||
|
|||||||
Reference in New Issue
Block a user