open-standards/wai/http-conformance/falsify/claim-through-any-receipt.patch
Transaction Science ac602599d0 http receipts round 3: falsify the fixes
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]>
2026-10-08 04:15:46 -04:00

15 lines
931 B
Diff

# must fail: receipts_claim_through_foreign_item
# a claim about a receipt attached through a group no item that passed names (receipts::check_claim)
diff --git a/wai/wai-rs/src/http_binding/receipts.rs b/wai/wai-rs/src/http_binding/receipts.rs
index 83cd7ccb..42574240 100644
--- a/wai/wai-rs/src/http_binding/receipts.rs
+++ b/wai/wai-rs/src/http_binding/receipts.rs
@@ -732,7 +732,7 @@ pub fn check_claim(
};
let attests = match claim.subject_type {
SubjectType::Object if claim.subject == *cid => Attests::Object,
- SubjectType::Receipt if groups.contains(&claim.subject) => Attests::Receipt,
+ SubjectType::Receipt if groups.contains(&claim.subject) || !groups.is_empty() => Attests::Receipt,
SubjectType::Object if claim.class() == ClaimClass::SoftBinding && publisher(&claim.subject).is_some() => Attests::Ancestor,
_ => return Err(ReceiptRefusal::NotAboutObject),
};