Skip to content

Reject HTTP error responses before partitioning - #4414

Draft
CyMule wants to merge 7 commits into
mainfrom
fix/reject-url-error-responses
Draft

CyMule wants to merge 7 commits into
mainfrom
fix/reject-url-error-responses

Conversation

@CyMule

@CyMule CyMule commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reject HTTP 4xx/5xx responses before classifying and partitioning their bodies. Previously a failed URL fetch could ingest the server's error page as if it were the requested document. Preserve successful response handling and timeout forwarding.

Compatibility

This intentionally changes failed-fetch behavior: callers that previously accepted an HTTP error page now receive ValueError with the HTTP status. It adds no document-size or format limit. Successful 200/206 responses retain their original bytes and MIME-detection inputs.

The existing metrics-test change serializes shared result-directory access across pytest-xdist workers to prevent one test deleting another's output.

Validation

Synced with current main on September 14, 2026.

  • URL helper/status/timeout checks: 10 passed, covering 400/401/403/404/429/500/503 errors and successful 200/206 responses.
  • Metrics suite with eight workers: 26 passed.
  • Ruff and diff whitespace checks passed.
  • Fresh full CI pending.

This branch has not been deployed

No deployments
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