open-standards/wai/http-conformance/falsify/conforming-withheld.patch
Transaction Science 1cffbc6ffd wai: HTTP reports a refinement by its refines.base alone; a conforming envelope's refinement tested
- §7 step 4 as the text stands: a refinement of the pick is one whose refines.base, read
  on its own, is the pick's id (container::refinements_naming, refinements_naming in
  http_verify.py), so one whose refines is otherwise malformed is reported dropped
  (components_nonconforming). Of a conforming envelope the set is the same as before.
- Objects OCF (ONC's conforming twin: refinements [2], dropped []), ONM (refines
  {base: b} alone: reported) and ONX (refines {base: x}: not reported), on the whole and
  the range paths; fetch_OR_malformed_refines now reports its refinement; the generator
  checks each outcome.
- falsify: conforming-withheld and refines-read-whole, each with an http_verify.py
  --mutate, wired into falsify/run.sh; nonconforming-offered's must-fail list extended.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 03:11:46 -04:00

15 lines
929 B
Diff

# must fail: fetch_OCF_whole fetch_OCF_ranged
# the plan withholds the refinements of an envelope every component of which conforms (session::nonconforming_refinements)
diff --git a/wai/wai-rs/src/http_binding/session.rs b/wai/wai-rs/src/http_binding/session.rs
index fd00472d..24c7063d 100644
--- a/wai/wai-rs/src/http_binding/session.rs
+++ b/wai/wai-rs/src/http_binding/session.rs
@@ -205,7 +205,7 @@ impl Selector {
/// conform (SPEC §7.1, `ManifestV2::check_component_roles` over the head's manifest) does
/// not offer: every one of them where it does not conform, none where it does.
fn nonconforming_refinements(m: &ManifestV2, wanted: &[(usize, Class)]) -> Vec<usize> {
- if m.check_component_roles().is_ok() {
+ if false && m.check_component_roles().is_ok() {
return Vec::new();
}
wanted.iter().map(|&(i, _)| i).filter(|&i| m.renditions.get(i).is_some_and(|e| e.is_refinement())).collect()