Skip to content

merge: consolidate PRs #20, #21, #22, #23 with review fixes - #25

Merged
Skulldorom merged 10 commits into
mainfrom
hermes/review-fixes
Jul 20, 2026
Merged

merge: consolidate PRs #20, #21, #22, #23 with review fixes#25
Skulldorom merged 10 commits into
mainfrom
hermes/review-fixes

Conversation

@Skulldorom

Copy link
Copy Markdown
Owner

Summary

Merges four open PRs into a single branch with all conflicts resolved and review feedback applied.

PRs consolidated

PR Description
#20 Redact sensitive FreshRSS login failure logs
#21 Normalize and URL-encode FreshRSS categories
#22 TestClient fixtures and transport stubs
#23 Pydantic models for FreshRSS response validation

Review feedback applied

Merge resolution notes

Test results

44/44 passed — covering all four PRs' behaviors plus review-fix regressions.

Closes #20, closes #21, closes #22, closes #23.

- Add urlsplit import for safe host extraction
- Log only upstream_host on login failure, not full response body
- Expand test to verify no credentials/response leaked into logs
- Add quote import for safe URL encoding
- Strip whitespace from category before use
- URL-encode special characters in category stream IDs
- Add max_length=200 to category query parameter
- Parametrized test for category normalization (whitespace, /, %, ?, Unicode)
- Replace import_app() with main_module + test_client pytest fixtures
- Add install_freshrss_transport() helper for stub transport
- Rewrite endpoint tests to exercise the app through TestClient
- Port secret-leak test (PR #20) and category normalization (PR #21)
- Preserve reauthentication, timeout, and concurrent-safety tests
- Add FreshRSSOrigin, FreshRSSAlternate, FreshRSSItem, FreshRSSResponse models
- Add validate_freshrss_response() with strict validation
- Validate timestamps (finite, in-range) via field validator
- Port validation tests to TestClient fixture style
- Add pydantic>=2.0 dependency to pyproject.toml
After Pydantic validation (PR #23), a 403 retry that returns an
empty dict is caught by validate_freshrss_response before the
RequestException handler, producing 'invalid unread response' rather
than 'unread request failed'.
PR #21 review (P2): Treat '.' and '..' categories as reading-list fallback
  - quote() leaves dots unchanged (RFC 3986 unreserved), so requests
    normalizes 'label/.' → 'label/' and 'label/..' → 'user/-/' as path
    traversal. Reject these labels before URL construction.

PR #23 review (P2): Catch OverflowError from isfinite() on huge ints
  - math.isfinite() raises OverflowError when converting a huge Python
    int to float, before the existing try/except could wrap it as
    ValidationError. Now isfinite() is inside the guarded block,
    producing a 502 instead of a 500.

Tests: dot-label parametrized cases + huge-int overflow test
@Skulldorom
Skulldorom marked this pull request as ready for review July 20, 2026 10:01
@Skulldorom
Skulldorom merged commit 34bc7e4 into main Jul 20, 2026
2 checks passed
@Skulldorom
Skulldorom deleted the hermes/review-fixes branch July 20, 2026 10:02
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