Skip to content

Stop rebilling completed Instagram recheck batches - #91

Merged
kevinjylin merged 1 commit into
mainfrom
codex/fix-apify-recheck-batches
Oct 13, 2026
Merged

kevinjylin merged 1 commit into
mainfrom
codex/fix-apify-recheck-batches

Conversation

@kevinjylin

Copy link
Copy Markdown
Member

When more than 50 event source posts were due for the three-day deletion check, the Apify detail helper reused a completed batch's saved post list for subsequent purchases. Later cycles could keep buying lookups for expired posts while recording zero useful checks.

Completed detail runs now accept the next batch's post list; unfinished runs retain their original list and paid run ID. Rechecks persist each batch before consuming its run, track run IDs so recovery cannot count a deletion twice, and publish withdrawals before recording them as finished. Empty or unrelated output stops further batches and keeps the paid run for investigation.

The three-day eligibility window, one successful check per source post, and two separate deletion confirmations remain unchanged. Existing completed recovery files need no reset.

Validation: all 845 pipeline tests pass; git diff --check passes. Eleven new integration tests cover multiple batches and later cycles, legacy state, interrupted reads/writes, changed worklists, expired events, charge/run failures, unrelated output, rate limits, and withdrawal failures. Apify and database operations in the tests are simulated; no paid production run was started.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
highlander-hub Ignored Ignored Oct 13, 2026 9:47pm UTC

@kevinjylin
kevinjylin marked this pull request as ready for review October 13, 2026 21:50
@kevinjylin
kevinjylin merged commit 7a9eba6 into main Oct 13, 2026
7 checks passed
@kevinjylin
kevinjylin deleted the codex/fix-apify-recheck-batches branch October 13, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant