From 8d24e7bbb5e1b233618c6f2a7403bba25f80d9e5 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Oct 2026 11:24:17 +0200 Subject: [PATCH] asks: a granted publish is the control for every refusal the proof reads as the bus's --- asks/proof_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/asks/proof_test.go b/asks/proof_test.go index d4b8ba1..c90260d 100644 --- a/asks/proof_test.go +++ b/asks/proof_test.go @@ -232,11 +232,16 @@ func TestTheOperatorsAnswerEndToEnd(t *testing.T) { By: &asks.Person{Who: asks.Operator, Kind: "telegram", Identity: "42", Verified: "user id verified"}}) decided := asks.DecidedSubject("lab-asker") // The control: what is granted is not refused, so a refusal below is the bus's word and not the lab's. - for _, try := range []struct{ user, subject string }{ - {machine + ".lab-asker", "mesh.seat.operator-channel.accept.cancel.lab-asker"}, - {machine + ".telegram", asks.IntakeSubject(asks.StandingWhat, "telegram")}, + // The channel's control is a true standing, now: a false one would hold the router's messages. + standing, _ := json.Marshal(asks.Standing{Ready: true, EditsSilently: true, At: time.Now().UTC()}) + for _, try := range []struct { + user, subject string + body []byte + }{ + {machine + ".lab-asker", "mesh.seat.operator-channel.accept.cancel.lab-asker", []byte(`{"id":"none"}`)}, + {machine + ".telegram", asks.IntakeSubject(asks.StandingWhat, "telegram"), standing}, } { - if l.refusedToPublish(try.user, try.subject, []byte(`{"id":"none","ready":true}`)) { + if l.refusedToPublish(try.user, try.subject, try.body) { t.Fatalf("the control failed: %s was refused %s, which the controller grants it", try.user, try.subject) } }