Patches (falsify/run.sh) for each fix, each failing the corpus cases it names: legacy-group-read, walk-unclamped, fetch-unmemoised, fetch-budget-unchecked, file-cap-unchecked, index-size-unchecked, index-items-uncapped, index-claims-uncapped, claim-through-any-receipt, ancestor-unrecovered, step6-skipped, figure-not-held-accepted, energy-context-assumed, gap-coordinates-unchecked; ancestor-as-object, claim-parent-unfetched, rcpt-name-unchecked, walk-skipped and walk-unbounded regenerated against the new receipts.rs. Python mutations groups-from-listed, budget-unchecked and caps-unchecked added, and the round's legacy-admitted, memo-off, walk-unclamped, step6-skipped and ancestor-any listed in run.sh in place of ancestor-as-object. The CLI's stream server now outlasts the deadline, so a client without the index cap reports the deadline instead; the wall-clock assertion is dropped (the deadline's own report is what the test reads). Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
886 B
Diff
15 lines
886 B
Diff
# must fail: receipts_legacy_group receipt_file_legacy_group
|
|
# a legacy group file read, its name not covering its parent (receipts::read_group_file)
|
|
diff --git a/wai/wai-rs/src/http_binding/receipts.rs b/wai/wai-rs/src/http_binding/receipts.rs
|
|
index f2bdba57..263dc3c9 100644
|
|
--- a/wai/wai-rs/src/http_binding/receipts.rs
|
|
+++ b/wai/wai-rs/src/http_binding/receipts.rs
|
|
@@ -193,7 +193,7 @@ pub fn read_group_file(name: &[u8; 32], bytes: &[u8]) -> Result<GroupReceipt, Re
|
|
let text = std::str::from_utf8(bytes).map_err(|_| malformed_group())?;
|
|
let v = crate::claim_receipt::parse_strict(text).map_err(|_| malformed_group())?;
|
|
let g = GroupReceipt::from_json(&v).map_err(ReceiptRefusal::Delivery)?;
|
|
- if g.label.is_none() {
|
|
+ if g.label.is_none() && g.link_hash() == [0u8; 32] {
|
|
return Err(ReceiptRefusal::LegacyGroup);
|
|
}
|
|
if g.link_hash() != *name {
|