New: threshold-all, refusal-ends, reuse-stale, plus-sign, dispatch-layer, union-no-layer, wai-prefix-case, dup-caps, record-alt, base-unanswered, each naming the corpus cases it must fail. accept-gzip, trust-content-range, skip-on-absent and intersection are the same defects written against the current code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
839 B
Diff
15 lines
839 B
Diff
# must fail: plan_OS_base_only_threshold fetch_OS_threshold_stall
|
|
# refinement bytes count toward the threshold (plan::plan_components)
|
|
diff --git a/wai/wai-rs/src/http_binding/plan.rs b/wai/wai-rs/src/http_binding/plan.rs
|
|
index 42c4bf47..4d021ecd 100644
|
|
--- a/wai/wai-rs/src/http_binding/plan.rs
|
|
+++ b/wai/wai-rs/src/http_binding/plan.rs
|
|
@@ -172,7 +172,7 @@ pub fn plan_components(
|
|
_ => merged.push((class, a, b)),
|
|
}
|
|
}
|
|
- let base: u128 = merged.iter().filter(|(c, _, _)| *c == Class::Base).map(|(_, a, b)| u128::from(b - a)).sum();
|
|
+ let base: u128 = merged.iter().map(|(_, a, b)| u128::from(b - a)).sum();
|
|
if base * 1000 >= u128::from(policy.full_threshold_permille) * u128::from(rest.len()) && base > 0 {
|
|
plan.whole_rest = Some((rest, WhyWhole::Threshold));
|
|
plan.dropped.clear();
|