Twelve patches, each breaking one function (the content hash's domain, the root flag, the left-subtree rule, the chunk counter, the component digest check, the Content-Range and content-coding checks, the union, the trailing- byte rule, the missing-digest plan, the class merge, the selection digest test), each naming the cases that must fail. run.sh applies each to a fresh worktree, requires the build, and requires verify to fail naming them; then the Python mutations and the differential. Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
736 B
Diff
15 lines
736 B
Diff
# must fail: head_proof_ok_OH
|
|
# covered subtrees are hashed with chunk counter 0 (head_proof::node_cv)
|
|
diff --git a/wai/wai-rs/src/http_binding/head_proof.rs b/wai/wai-rs/src/http_binding/head_proof.rs
|
|
index 40b6f1fa..d13bcdac 100644
|
|
--- a/wai/wai-rs/src/http_binding/head_proof.rs
|
|
+++ b/wai/wai-rs/src/http_binding/head_proof.rs
|
|
@@ -66,7 +66,7 @@ fn node_cv(
|
|
if start >= c {
|
|
it.next().ok_or(RangeRefusal::HeadProofMismatch)
|
|
} else if start + len <= c {
|
|
- Ok(subtree_cv(&x_prefix[start as usize..(start + len) as usize], start))
|
|
+ Ok(subtree_cv(&x_prefix[start as usize..(start + len) as usize], 0))
|
|
} else {
|
|
let l = left_len(len);
|
|
let left = node_cv(x_prefix, start, l, c, it)?;
|