Adapt invalid-receipt test to quarantine semantics after rebase

The structurally invalid record is now quarantined aside on first
lookup instead of staying in place globally fail-closed, so the test
clears the .corrupt file before exercising journal validation alone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jack
2026-07-26 13:34:06 +02:00
co-authored by Claude Opus 4.8
parent 7d038016b8
commit 6e1da519ca
@@ -224,7 +224,10 @@ struct BLEPrivateMediaReceiptStoreTests {
)
#expect(FileManager.default.fileExists(atPath: victim.path))
try FileManager.default.removeItem(at: receiptURL)
// The invalid record was quarantined aside, never executed. Clear it
// so the second phase exercises the journal validation on its own.
#expect(!FileManager.default.fileExists(atPath: receiptURL.path))
try FileManager.default.removeItem(at: quarantinedRecord(in: root))
let journal = JournalFixture(
version: 1,
entries: [messageID: JournalEntryFixture(