🐛 fix: harden _paginate (page cap, duplicate page= guard) #199
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/paginate-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
_paginategets two guards (#181):The
pageguard parses the query (parse_qs(urlsplit(path).query)), so?somepage=1does not trip it.Evidence
totalPagesand never returning an empty page looped forever (_core.py:113-123); a path already carryingpage=was sent with two conflicting values.After: TDD — the guard test written and confirmed red first (ConnectionError instead of
ValueError); the cap test run only post-fix (its red state is a hang by construction).pytest -q→ 246 passed (+4),mypy→ clean.Merge Danger
Door: two-way
Blast Radius: low — normal pagination paths (
totalPagespresent, or empty-page termination) behave identically; the cap only fires on a misbehaving server.Closes #181.
WIP: 🐛 fix: harden _paginate (page cap, duplicate page= guard)to 🐛 fix: harden _paginate (page cap, duplicate page= guard)