diff --git a/.changeset/refusal-pin-message.md b/.changeset/refusal-pin-message.md new file mode 100644 index 00000000..2f015151 --- /dev/null +++ b/.changeset/refusal-pin-message.md @@ -0,0 +1,11 @@ +--- +--- + +test(relay): say what the refusal pin test holds + +`every_refusal_word_is_pinned_to_its_byte`'s failure message no longer says the refusal bytes +travel. They do not: the word is a process-local `AtomicU8` (`Refusal::from_word`'s doc, +`crates/nostream-relay/src/sink.rs:92-98`), and a refused client receives a `1013` close with +a reason string. The message now names the pin it holds — the three bytes, `word()`'s arms and +the enum's discriminants are the same numbers — and stays the inline literal it was. +Test-only: no production code path, no behaviour change. diff --git a/crates/nostream-relay/src/sink.rs b/crates/nostream-relay/src/sink.rs index 7ef90848..579ea779 100644 --- a/crates/nostream-relay/src/sink.rs +++ b/crates/nostream-relay/src/sink.rs @@ -698,7 +698,7 @@ mod tests { assert_eq!( (NO_REFUSAL, QUEUE_FULL, BUDGET_EXHAUSTED), (0, 1, 2), - "the bytes are the wire contract" + "the refusal bytes are pinned to 0, 1, 2 — the numbers word() returns and the enum stores" ); for refusal in [Refusal::None, Refusal::QueueFull, Refusal::BudgetExhausted] {