open-standards/wai/http-conformance/falsify/drop-domain.patch
Transaction Science 1cddbdad19 wai: http-conformance falsification patches and their runner
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]>
2026-10-05 07:52:43 -04:00

14 lines
574 B
Diff

# must fail: head_proof_ok_O3 fetch_O3_low
# the content hash loses its domain (jwp_hash::content_hash)
diff --git a/wai/wai-rs/src/jwp_hash.rs b/wai/wai-rs/src/jwp_hash.rs
index d20bc358..f773f1fd 100644
--- a/wai/wai-rs/src/jwp_hash.rs
+++ b/wai/wai-rs/src/jwp_hash.rs
@@ -13,7 +13,6 @@ pub const DOMAIN_OBJECT: &[u8] = b"moq-jwp:object\x01";
/// followed by the envelope bytes.
pub fn content_hash(envelope_bytes: &[u8]) -> [u8; 32] {
let mut h = blake3::Hasher::new();
- h.update(DOMAIN_OBJECT);
h.update(envelope_bytes);
*h.finalize().as_bytes()
}