.vbw-planning/milestones/ui-fixes-and-smart-scraping/phases/04-smart-scrape-recommendations/04-PLAN-01-SUMMARY.md
Backend foundation for smart scrape recommendations: a configurable word count threshold (scrape_recommendation_threshold defaulting to 200), a Source.scrape_candidates scope that identifies active sources with low feed word counts and scraping disabled, and an Analytics::ScrapeRecommendations query object that wraps the scope with memoized candidates_count, candidate_ids, and candidate? methods for use by the dashboard and sources index.
| Hash | Message |
|---|---|
| 7785805 | feat(config): add scrape_recommendation_threshold to ScrapingSettings |
| 74ce1bc | feat(model): add Source.scrape_candidates scope |
| 09389ae | feat(analytics): add ScrapeRecommendations query object |
DEFAULT_SCRAPE_RECOMMENDATION_THRESHOLD = 200 constant, attr_accessor, reset in reset!, and setter with normalize_numeric. 6 tests.candidates_count, candidate_ids, and candidate? methods. Memoized results. 6 tests.autoload :ScrapeRecommendations to the Analytics module in lib/source_monitor.rb.lib/source_monitor/configuration/scraping_settings.rb -- Added threshold constant, attr_accessor, reset, setterapp/models/source_monitor/source.rb -- Added scrape_candidates class methodlib/source_monitor/analytics/scrape_recommendations.rb -- New query objectlib/source_monitor.rb -- Added autoload declarationtest/lib/source_monitor/configuration_test.rb -- 6 new teststest/models/source_monitor/source_test.rb -- 7 new teststest/lib/source_monitor/analytics/scrape_recommendations_test.rb -- 6 new tests (new file)SourceMonitor::ItemContent.create!(item: item) with content set on the Item, since feed_word_count is computed from item.content in a before_save callback on ItemContent.