Skip to content

fix(parasite-risk): keep failed crawls out of low-risk results - #431

Merged
AgriciDaniel merged 1 commit into
AgriciDaniel:mainfrom
Afloat16:fix/parasite-unavailable-audits-20261111
Nov 15, 2026
Merged

AgriciDaniel merged 1 commit into
AgriciDaniel:mainfrom
Afloat16:fix/parasite-unavailable-audits-20261111

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Summary

When every fetch fails, the scanner currently reports overall_risk: low and exits successfully despite auditing zero pages. HTTP error bodies are also counted as successfully audited content, so a 404, rate-limit page, or server error can look like a low-risk article.

Treat HTTP failures as crawl errors. Report unknown risk when there are no usable pages and return a failing CLI exit status, while retaining the per-URL errors.

Validation

  • Before the fix: all 5 new unavailable-crawl regressions fail.
  • python -m pytest -q tests/test_parasite_unavailable_audits.py tests/test_content_quality.py tests/test_phase_j_executable.py: 83 passed.
  • ruff check scripts/parasite_risk.py tests/test_parasite_unavailable_audits.py and git diff --check: passed.
  • Mocked HTTP and timeout cases verify the crawl result and JSON CLI status without network calls.
  • Updated CHANGELOG.md.

@AgriciDaniel
AgriciDaniel merged commit f38c0c9 into AgriciDaniel:main Nov 15, 2026
9 checks passed
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.

2 participants