T4 no-held-back: the approval gate's table no longer holds a row for an ask held back by a count
The row of an ask the router holds back as the fourth open one goes, and the router's refusal row names another refusal: the operator channel keeps no limit on open asks, and its record no state `held-back` (mesh-sdk, mesh-contracts). Builds: design 47 H §764 (The operator channel's limit), H-A-57 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -218,16 +218,6 @@ func TestTheRefusalsAndAnswers(t *testing.T) {
|
||||
t.Fatalf("asked %d, %v, runs %d", len(w.asked), err, w.runs)
|
||||
}
|
||||
}},
|
||||
{"§17: an ask the router holds back as the fourth open one still waits", func(t *testing.T, w *world) {
|
||||
_, _ = w.do(call("wipe", `{}`))
|
||||
a := w.asked[0]
|
||||
rec := w.records["shell."+a.ID]
|
||||
rec.State, rec.HeldSince = "held-back", operatorchannelclient.FormatTime(w.now)
|
||||
w.records["shell."+a.ID] = rec
|
||||
if _, err := w.do(call("wipe", `{}`)); err == nil || !strings.Contains(err.Error(), "still waiting") || len(w.asked) != 1 {
|
||||
t.Fatalf("%v, asked %d", err, len(w.asked))
|
||||
}
|
||||
}},
|
||||
{"§14, §15: approved, the same call runs once; made again it is already run and asks anew", func(t *testing.T, w *world) {
|
||||
_, _ = w.do(call("wipe", `{"dir":"scratch"}`))
|
||||
w.decide(gate.OptionApprove, w.now.Add(time.Minute))
|
||||
@@ -321,9 +311,9 @@ func TestTheRefusalsAndAnswers(t *testing.T) {
|
||||
_, _ = w.do(call("wipe", `{}`))
|
||||
a := w.asked[0]
|
||||
rec := w.records["shell."+a.ID]
|
||||
rec.State, rec.Answer = "refused", "the asker has too many open asks"
|
||||
rec.State, rec.Answer = "refused", "the asker is not known to the router"
|
||||
w.records["shell."+a.ID] = rec
|
||||
if _, err := w.do(call("wipe", `{}`)); err == nil || !strings.Contains(err.Error(), "the asker has too many open asks") {
|
||||
if _, err := w.do(call("wipe", `{}`)); err == nil || !strings.Contains(err.Error(), "the asker is not known to the router") {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
}},
|
||||
|
||||
Reference in New Issue
Block a user