.vbw-planning/milestones/ui-fixes-and-smart-scraping/phases/02-feed-reliability/01-SUMMARY.md
Added structured error categorization to the fetch pipeline with Cloudflare/login wall/CAPTCHA detection. Feeds returning HTML challenge pages at HTTP 200 now correctly raise BlockedError instead of misleading ParsingError. Fetch logs now include an error_category column for coarse filtering. Retry policy applies aggressive circuit break (4h) for blocked and authentication errors.
Add BlockedError to error hierarchy (Task 1 - pre-existing, commit bb1cbfb)
BlockedError and AuthenticationError subclasses of FetchErrorAdd HTML body sniffing (Task 2)
detect_blocked_response inspects first 4KB for Cloudflare, CAPTCHA, and login wall markersFeedjira.parse in parse_feedAdd error_category column to FetchLog (Task 3)
by_category scope for filteringMap error classes to categories in SourceUpdater (Task 4)
ERROR_CATEGORY_MAP constant maps error classes to category stringscategorize_error handles HTTPError status-based categorization (401/403 -> auth)error_category on fetch log creationAdd blocked/authentication to RetryPolicy (Task 5)
:blocked and :authentication keys: 1 attempt, 1h wait, 4h circuit breakpolicy_key routes BlockedError and AuthenticationError appropriatelyUpdate perform_fetch rescue list (Task 6)
BlockedError and AuthenticationError added to re-raise listTests for all new paths (Task 7)
lib/source_monitor/fetching/feed_fetcher.rb - HTML body sniffing, rescue listlib/source_monitor/fetching/feed_fetcher/source_updater.rb - error category mappinglib/source_monitor/fetching/retry_policy.rb - blocked/auth policiesapp/models/source_monitor/fetch_log.rb - validation, scopedb/migrate/20260306233004_add_error_category_to_fetch_logs.rb - new migrationtest/lib/source_monitor/fetching/blocked_error_test.rb - newtest/lib/source_monitor/fetching/html_detection_test.rb - newtest/lib/source_monitor/fetching/retry_policy_test.rb - newtest/lib/source_monitor/fetching/feed_fetcher/source_updater_error_category_test.rb - newtest/lib/source_monitor/fetching/feed_fetcher_error_handling_test.rb - modifiedtest/models/source_monitor/fetch_log_test.rb - modifiedtest/dummy/db/schema.rb - updated by migration| Hash | Message |
|---|---|
| bb1cbfb | feat(fetching): add BlockedError and AuthenticationError to error hierarchy |
| f291d8f | feat(fetching): add HTML body sniffing for blocked response detection |
| abc07cc | feat(fetch_log): add error_category column for structured error classification |
| 4e88a00 | feat(source_updater): map error classes to error_category on fetch logs |
| 0546128 | feat(retry_policy): add blocked and authentication retry policies |
| fe3d812 | test(fetching): add tests for error categorization and blocked detection |
bin/rubocop on all modified files: 0 offensesbin/rails test: 1304 runs, 3951 assertions, 0 failures, 0 errors, 0 skips