Skip to content

fix(errors): forward Html2rss::Error diagnostics and keep BLOCKED_SURFACE cacheable - #1194

Merged
gildesmarais merged 1 commit into
mainfrom
feat/error-diagnostics-blocked-surface
Oct 22, 2026
Merged

gildesmarais merged 1 commit into
mainfrom
feat/error-diagnostics-blocked-surface

Conversation

@gildesmarais

Copy link
Copy Markdown
Member

What changed

  • ErrorClassifier::Diagnostics.from_error walks any Html2rss::Error for attempts / transport_meta (not only NoFeedItemsExtracted)
  • Decision#empty_reason and RenderResult#cacheable? replace Service::EMPTY_REASON_BY_CODE and duplicated cache predicates
  • BLOCKED_SURFACE stays cacheable: true (documented in classifier + docs/README.md); ConnectionFailed joins NETWORK_ERRORS when the gem defines it

Why

Post-1.2.5 verification: feed.render often lacked strategy_attempts on transport terminals, and BLOCKED_SURFACE cache policy needed an explicit product stance (keep cacheable to avoid hammering challenge pages for the feed TTL).

Risk

  • low — classification codes unchanged; cacheability for BLOCKED_SURFACE matches current production behavior; ConnectionFailed classifier examples are if:-guarded until html2rss ships the class beyond 0.32.3

Review map

  1. spec/html2rss/web/error_classifier_spec.rb — diagnostics + BLOCKED_SURFACE policy
  2. app/web/errors/error_classifier.rb — Decision/Diagnostics
  3. spec/html2rss/web/feeds/service_spec.rb / responder_spec.rb — cache + emit shape

Validation

  • Dev Container make ready (exit 0; 371 examples)

Follow-up

After the companion html2rss gem PR is released and web bumps the pin, drop const_defined? / if: guards around ConnectionFailed.

…FACE cacheable

Move empty_reason and cacheable? onto Decision/RenderResult, extract
strategy_attempts from any Html2rss::Error on the cause chain, and document
BLOCKED_SURFACE TTL caching so challenge pages are not re-probed every request.
@gildesmarais
gildesmarais merged commit a287fbd into main Oct 22, 2026
15 checks passed
@gildesmarais
gildesmarais deleted the feat/error-diagnostics-blocked-surface branch October 22, 2026 16:00
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