Design 47 H1: a held destroy-level ask says its level; an offer with no channel named says so

The router held the bus module's destroy-level asks with the bare words
"no channel can carry it now", so the asker could not tell why. holdWhy
now names the destroy level and that no channel carries a destroy answer
yet. The bus module's tool says "offered, channel not yet named" for an
open record with no tickets, never "offered on :".

Builds: design 47 H H-A-237 (3), H-A-239 (2)
This commit is contained in:
2026-11-21 11:26:19 +01:00
parent a8f2316d08
commit 7c6cf18532
4 changed files with 15 additions and 1 deletions
+3
View File
@@ -649,6 +649,9 @@ func (h *Holder) holdWhy(a oc.Ask) string {
}
parts = append(parts, why)
}
case answerLevel(a) == occ.Destroy:
// Design 47 H-A-237 (3): the held ask names its level, which no channel carries yet (carriers).
parts = append(parts, Display(k.Kind)+": the ask is at the destroy level, and no channel carries a destroy answer yet (it needs a code)")
}
}
if len(parts) == 0 {
@@ -149,6 +149,12 @@ func TestAFailedRootAskIsSaidAndKeepsAFreshWord(t *testing.T) {
if why := h.holdWhy(heldAsk(c, "d-9")); !strings.Contains(why, "no responders") {
t.Errorf("a held ask does not say why: %q", why)
}
// Design 47 H-A-237 (3): an ask held at the destroy level says its level, which no channel carries yet.
destroy := heldAsk(c, "d-10")
destroy.Options[0].Level = occ.Destroy
if why := h.holdWhy(destroy); !strings.Contains(why, "destroy level") || !strings.Contains(why, "no channel carries a destroy answer yet") {
t.Errorf("a destroy ask held does not name its level: %q", why)
}
}
// H3: a message rendered while root is not free offers no approval; a word kept for rendering is never the