Patches (falsify/run.sh), each failing the corpus cases it names: bytes-unchecked, decision-unchecked, recovery-record-unchecked, operating-point-unchecked, session-accepted, declaration-unnamed, first-publisher, matchers-need-object and set-sha-faults; claim-through-any-receipt, fetch-unmemoised, fetch-budget-unchecked and file-cap-unchecked regenerated against the new receipts.rs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
1.1 KiB
Diff
15 lines
1.1 KiB
Diff
# must fail: param_set_sha_uppercase
|
|
# a pin whose digest is not lowercase hexadecimal read as a fault, not pin_malformed (the corpus tool's param_set)
|
|
diff --git a/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs b/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs
|
|
index 12a55982..34d16fd9 100644
|
|
--- a/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs
|
|
+++ b/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs
|
|
@@ -925,7 +925,7 @@ mod built {
|
|
// A pin whose digest is not 64 lowercase hexadecimal digits locates no grants
|
|
// file: the pin's own check refuses it (pin_malformed).
|
|
let grants = match (input["grants"].as_str(), unhex32(sha)) {
|
|
- (Some(p), Some(d)) => read_grants_file(&d, &c.file(p)?).map_err(|e| Stop::Fault(format!("the grants file: {e}")))?,
|
|
+ (Some(p), d) => read_grants_file(&d.ok_or(Stop::Fault("sha256 is not a hash".into()))?, &c.file(p)?).map_err(|e| Stop::Fault(format!("the grants file: {e}")))?,
|
|
_ => Vec::new(),
|
|
};
|
|
let mut sink = SinkKeyLog::new(revs, anchors).with_statuses(statuses).with_grants(grants);
|