From fdedf290d574b9314c867158379df36aa8ec6410 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 3 Nov 2026 16:41:30 +0100 Subject: [PATCH] =?UTF-8?q?provisioner=5Fretire=5Fapprove=20and=20provisio?= =?UTF-8?q?ner=5Fretire=5Freject=20name=20no=20removed=20controller=20verb?= =?UTF-8?q?=20either:=20they=20ask=20nobody,=20and=20the=20operator's=20an?= =?UTF-8?q?swer=20on=20the=20operator=20channel=20is=20named=20in=20why=20?= =?UTF-8?q?and=20by=20(ADR=200570=20=C2=A75,=20ADR=200604=20=C2=A78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/provider/harness/retirement.go | 12 +++++++----- go/provider/harness/retirement_test.go | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/go/provider/harness/retirement.go b/go/provider/harness/retirement.go index b134d98..180213a 100644 --- a/go/provider/harness/retirement.go +++ b/go/provider/harness/retirement.go @@ -482,7 +482,7 @@ func (h *Harness) retirementBody(change string, consumers []map[string]any, extr } // RetirementTools are the four tools every provider serves for retirement, the same names in every -// module: the controller's `retire` and `cleanup` verbs ask them on the provider's machine. +// module: a caller asks them on the provider's machine, with the operator's answer named in why and by. func RetirementTools(h *Harness) []stdio.Tool { if h == nil { return nil @@ -493,7 +493,7 @@ func RetirementTools(h *Harness) []stdio.Tool { who := map[string]any{ "why": map[string]any{"type": "string", "description": "why — required, kept in the hand-act log"}, "by": map[string]any{"type": "string", "description": "who decided"}, - "via": map[string]any{"type": "string", "description": "mesh-controller when asked through its verbs"}, + "via": map[string]any{"type": "string", "description": "the part or session that asks, when not the caller itself"}, } withSet := map[string]any{"consumers": map[string]any{"type": "array", "items": map[string]any{"type": "string"}, "description": "the set, exactly as provisioner_retirement names it"}} @@ -518,7 +518,8 @@ func RetirementTools(h *Harness) []stdio.Tool { }}, {Name: "provisioner_retire_approve", Description: "Retire exactly the set waiting for a person (or the set rejected earlier): access disabled, data " + - "kept and marked to delete. Use the controller's `retire approve`, which records the hand act.", + "kept and marked to delete. It asks nobody: the operator's answer on the operator channel to the provisioner's " + + "ask (novox/hq ADR 0570 §5) is named in why and by, which the hand-act log keeps.", Input: withSet, Run: func(args map[string]any) (any, error) { ctx, cancel := ask() @@ -530,8 +531,9 @@ func RetirementTools(h *Harness) []stdio.Tool { return map[string]any{"retired": orEmptyList(done)}, nil }}, {Name: "provisioner_retire_reject", - Description: "Keep the set waiting for a person active. Use the controller's `retire reject`.", - Input: withSet, + Description: "Keep the set waiting for a person active. It asks nobody: the operator's answer on the operator channel " + + "(novox/hq ADR 0570 §5) is named in why and by, which the hand-act log keeps.", + Input: withSet, Run: func(args map[string]any) (any, error) { kept, err := h.Reject(strs(args["consumers"]), argString(args, "why"), argString(args, "by"), argString(args, "via")) if err != nil { diff --git a/go/provider/harness/retirement_test.go b/go/provider/harness/retirement_test.go index c2533d0..5b38920 100644 --- a/go/provider/harness/retirement_test.go +++ b/go/provider/harness/retirement_test.go @@ -482,9 +482,9 @@ func TestTheToolsAnswer(t *testing.T) { tools := map[string]func(map[string]any) (any, error){} for _, tool := range RetirementTools(w.h) { tools[tool.Name] = tool.Run - // L3: the delete names no removed controller verb, and says who must be asked first (ADR 0604 §8). - if tool.Name == "provisioner_delete" && (strings.Contains(tool.Description, "controller") || !strings.Contains(tool.Description, "operator channel")) { - t.Errorf("provisioner_delete says %q", tool.Description) + // L3: the delete, approve and reject name no removed controller verb, and say where the operator answers (ADR 0604 §8). + if tool.Name != "provisioner_retirement" && (strings.Contains(tool.Description, "controller") || !strings.Contains(tool.Description, "operator channel")) { + t.Errorf("%s says %q", tool.Name, tool.Description) } } if len(tools) != 4 {