From f27ac0a0dd5e84fa40bcc63b9bc13596d42b130d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 4 Aug 2026 23:26:40 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=8F=20say=20what=20the=20refus?= =?UTF-8?q?al-code=20guard=20cannot=20catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment claimed a code documented on no surface at all would fail the test. It would not: the three lists it compares against are hand-kept, so a code this file has never heard of passes every assertion. What actually holds that end is the exhaustive match plus the per-axis unit test, and adding a code means editing both. --- tests/spec_bounds.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/spec_bounds.rs b/tests/spec_bounds.rs index e89b22f..1f3aba1 100644 --- a/tests/spec_bounds.rs +++ b/tests/spec_bounds.rs @@ -1201,8 +1201,16 @@ async fn the_class_refusal_codes_stay_published() { } // …and the closed set itself, on the one field that explains all of it: the - // union of both routes plus the pump, so a code documented on no surface at - // all still fails here. + // union of both routes plus the pump, so a code documented on one surface + // but missing from the field that collects them all still fails here. + // + // What this cannot catch: a code this file has never heard of. The three + // lists above are hand-kept, so a new `Attached` variant reaches the API + // documented nowhere and every assertion here still passes. The compiler + // holds that end instead — `refusal_code`'s match is exhaustive, so the + // variant cannot be added without a code — and + // `class_blueprint::tests::each_axis_names_the_ceiling_it_actually_hit` + // pins what that code is per axis. Adding one means editing both. let reason = spec["components"]["schemas"]["SkipResponse"]["properties"]["reason"]["description"] .as_str()