📏 say what the refusal-code guard cannot catch
Browse files at this commitf27ac0a0dd5e84fa40bcc63b9bc13596d42b130dParent: 82c0ee2- docs
- 📏 say what the refusal-code guard cannot catch
1 changed file +10 -2
- tests/spec_bounds.rs +10 -2
tests/spec_bounds.rsmodified+10 -2
| @@ -1201,8 +1201,16 @@ async fn the_class_refusal_codes_stay_published() { | ||
| 1201 | 1201 | } |
| 1202 | 1202 | |
| 1203 | 1203 | // …and the closed set itself, on the one field that explains all of it: the |
| 1204 | - // union of both routes plus the pump, so a code documented on no surface at | |
| 1205 | - // all still fails here. | |
| 1204 | + // union of both routes plus the pump, so a code documented on one surface | |
| 1205 | + // but missing from the field that collects them all still fails here. | |
| 1206 | + // | |
| 1207 | + // What this cannot catch: a code this file has never heard of. The three | |
| 1208 | + // lists above are hand-kept, so a new `Attached` variant reaches the API | |
| 1209 | + // documented nowhere and every assertion here still passes. The compiler | |
| 1210 | + // holds that end instead — `refusal_code`'s match is exhaustive, so the | |
| 1211 | + // variant cannot be added without a code — and | |
| 1212 | + // `class_blueprint::tests::each_axis_names_the_ceiling_it_actually_hit` | |
| 1213 | + // pins what that code is per axis. Adding one means editing both. | |
| 1206 | 1214 | let reason = |
| 1207 | 1215 | spec["components"]["schemas"]["SkipResponse"]["properties"]["reason"]["description"] |
| 1208 | 1216 | .as_str() |