mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #128] [MERGED] [downloader] Survive broken posts and stop early on failure streaks #132
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/128
Author: @Glitchy-Sheep
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/9/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/per-post-containment📝 Commits (4)
f0a675cfix: 🐛 One broken post no longer kills or hollows out the download run0dabff7feat: 📢 Run summary lists posts that failed to downloadb49c692feat: ✨ --skip-all-failures flag disables the failure-streak stop58b321etest: ✅ Containment, failure streak and Ctrl+C are guarded by tests📊 Changes
10 files changed (+497 additions, -26 deletions)
View changed files
📝
CHANGELOG.md(+8 -0)📝
README.md(+13 -0)📝
boosty_downloader/main.py(+6 -0)📝
boosty_downloader/src/application/exceptions/application_errors.py(+13 -0)➕
boosty_downloader/src/application/failure_streak.py(+32 -0)📝
boosty_downloader/src/application/use_cases/download_all_posts.py(+147 -23)📝
boosty_downloader/src/cli/cli_options.py(+11 -0)📝
boosty_downloader/src/cli/commands/download.py(+5 -0)📝
boosty_downloader/src/infrastructure/boosty_api/utils/validation_errors.py(+14 -3)➕
test/unit/use_cases/download_all_posts_test.py(+248 -0)📄 Description
Summary
One post with an unexpected error used to kill the whole download run (#88). Now the run skips it, remembers it, and only stops early when failures come in a row - a sign the problem is the environment, not the posts.
Fixes #88
Problem
OSError: File name too longon folder creation -> the run is dead, everything after that post is not downloadedFix
failed_downloads.logand in the run summary, the run continuesFailureStreakBreaker: 5 failed posts in a row stop the run - scattered failures are post problems, a streak means disk, permissions or network--skip-all-failuresturns the streak stop off for a full pass no matter whatBefore / After
Before: one broken post killed the run with a raw traceback; a dead disk meant hours of retries over every remaining post.
After: broken posts are skipped and listed in the summary; a systemic cause stops the run within 5 posts with a diagnosis and a resume hint.
Tests
test_unexpected_error_skips_the_post_and_the_run_continues- the #88 regression: the next post still downloadstest_cancellation_reraises_and_stops_immediately- Ctrl+C cannot be swallowed by the containment branchtest_failure_streak_stops_the_run_with_a_systemic_diagnosis- stops exactly at the 5th failure, names the cause and the resume pathtest_success_resets_the_streak- scattered failures never stop the runtest_skip_all_failures_never_stops- the escape hatch attempts every posttask cigreen, including 6 integration tests against the real Boosty APINotes
failed_downloads.log: title length trimming is a separate fix on the roadmap🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.