test(patreon): fix #704 — quarantine status + budget-cut cursor assertions
Two test breaks from the structured-results change: - An existing downloader test pinned a corrupt file to status "error"; it's now the distinct "quarantined" status (the new behavior). Updated it + removed the duplicate I'd added. - The budget-cut ingester test asserted the checkpoint cursor was the last FULLY-processed page (CUR1); it's actually the page we were cut on (CUR2, entered + cursor emitted before the budget check), matching the prior parse_last_cursor(last) semantics. Corrected the assertion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -280,7 +280,10 @@ async def test_backfill_budget_cut_returns_partial_with_progress(
|
||||
assert result.return_code == -1
|
||||
assert result.files_downloaded == 1 # post1 downloaded before the cut
|
||||
assert downloader.download_calls == 1 # post2's body never ran
|
||||
assert result.cursor == "CUR1" # structured checkpoint (plan #704)
|
||||
# The checkpoint is the page we were CUT ON (CUR2 — entered, cursor emitted,
|
||||
# then the budget check broke before processing it); the next chunk resumes
|
||||
# there. Structured (plan #704), matching the old parse_last_cursor(last).
|
||||
assert result.cursor == "CUR2"
|
||||
|
||||
|
||||
# --- recovery -------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user