A native Patreon backfill chunk's time-box (600s) was only checked between posts, but download_post downloads all of one post's media synchronously — so a media-heavy post (Pocketacer, event #41330) ran the chunk to the Celery soft limit (1350s) and finalized as error. Now the deadline is polled before each media item (should_stop()), so a heavy post stops at the budget and the remaining media re-fetch next chunk — overrun bounded to one media download instead of one whole post. Also genericized the soft-limit salvage message (it wrongly blamed the "gallery-dl subprocess" for a native walk).
619e771 fix + 14c4dd1 deterministic-clock test adjustment. Known residual (a single large streamed file can still overrun by its own download time) is documented in Scribe #723.
All CI-green on dev (run 642).
A native Patreon backfill chunk's time-box (600s) was only checked between posts, but `download_post` downloads all of one post's media synchronously — so a media-heavy post (Pocketacer, event #41330) ran the chunk to the Celery soft limit (1350s) and finalized as error. Now the deadline is polled before each media item (`should_stop()`), so a heavy post stops at the budget and the remaining media re-fetch next chunk — overrun bounded to one media download instead of one whole post. Also genericized the soft-limit salvage message (it wrongly blamed the "gallery-dl subprocess" for a native walk).
`619e771` fix + `14c4dd1` deterministic-clock test adjustment. Known residual (a single large *streamed* file can still overrun by its own download time) is documented in Scribe #723.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A backfill chunk's time-box (BACKFILL_CHUNK_SECONDS=600) was only checked
between POSTS, but download_post downloads ALL of one post's media
synchronously — so a single media-heavy post could run the chunk far past 600s,
all the way to the Celery soft time limit (1350s), where it was killed and
finalized as error (Pocketacer, event #41330: ran the full 22.5 min).
download_post now polls a should_stop() deadline BEFORE each media item and the
engine passes `now - start >= time_budget_seconds`, so a heavy post stops at the
budget and the remaining media (never marked seen) re-fetch next chunk. Bounds
chunk overrun to one media download instead of one whole post.
Also genericized the soft-limit salvage message — it claimed the "gallery-dl
subprocess" failed, which is wrong for a native Patreon walk; it now describes
the time-budget overrun + per-page checkpoint resume in platform-neutral terms.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The mid-post time-box check (619e771) reads time.monotonic() once more per post,
so test_backfill_budget_cut_returns_partial_with_progress's discrete tick
sequence shifted — the >budget tick (200) landed on post1's first-item check
instead of post2's gate, cutting post1 to 0 files. Add the extra tick (20, still
under budget) so post1's item downloads, matching production where the gate and
the first should_stop are microseconds apart.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
All CI-green on dev (run 642).
A native Patreon backfill chunk's time-box (600s) was only checked between posts, but
download_postdownloads all of one post's media synchronously — so a media-heavy post (Pocketacer, event #41330) ran the chunk to the Celery soft limit (1350s) and finalized as error. Now the deadline is polled before each media item (should_stop()), so a heavy post stops at the budget and the remaining media re-fetch next chunk — overrun bounded to one media download instead of one whole post. Also genericized the soft-limit salvage message (it wrongly blamed the "gallery-dl subprocess" for a native walk).619e771fix +14c4dd1deterministic-clock test adjustment. Known residual (a single large streamed file can still overrun by its own download time) is documented in Scribe #723.🤖 Generated with Claude Code