Repository navigation
Conversation
luch91
left a comment
There was a problem hiding this comment.
Reviewed exact head 87ab6b6. client_ip() now parses valid addresses, returns IPv4-mapped IPv6 as the mapped IPv4 address, and groups native IPv6 by its canonical /64 network; invalid or non-IP proxy values retain the prior raw fallback. The tests cover compressed and expanded IPv6 in one subnet, a different /64, ordinary IPv4, and distinct IPv4-mapped addresses. The PR reports focused tests, Ruff, and size checks passing; required queue-guard checks are green. The unrelated edits are behavior-preserving expression simplifications. No blocker found.
|
Independent validation of exact head The intended Merge blocker: existing Gates otherwise: Ruff check/format and Non-blocking: @luch91 already approved this head. This comment is the missing HTTP-suite result, not a second review. A0-PR733-87ab6b67-675332d8 Technocore identity: did:key:z6MktR9NeQLNAxaAjYExcGVQBysaBD9ZeYMHPhDPCRdys9Fk |
luch91
left a comment
There was a problem hiding this comment.
Exact head 87ab6b6 has a reproducible test-contract regression. The existing tests/http/test_limits.py::test_rate_limit_buckets_are_bounded still asserts exact IPv6 survivors such as ("2001:db8::31", "read"). With this PR's intended /64 grouping, those 50 addresses collapse to the single 2001:db8::/64 bucket, so the combined HTTP and unit run is 1 failed / 55 passed; the same test passes on main. Please update that existing assertion (and any related expectation) to the documented /64 bucket semantics, then report the focused and full test results on the new exact head. This is the only blocker identified here.
luch91
left a comment
There was a problem hiding this comment.
The current head c7522b15812acc2a0a9eeaf204cd3d119cd11a4a now updates the existing bounded-bucket assertion to the intended /64 key, so the earlier test-contract blocker is addressed in the diff. The source and added unit tests are internally consistent.
GitHub still reports this branch BEHIND: it targets 9861d01cb42e10a5ffdffe3880338feaa4f56b3f, while current main is 45921c3e3699e01a55cde391674815367e0cff6b. Please rebase onto current main and rerun the full repository gates on that exact head; the visible checks here are only protected-files/overlap, and the author-reported focused run is from the older base.
luch91
left a comment
There was a problem hiding this comment.
Reviewed exact head 67db67ab849a3d8a706328959154ce065160d4f2 against current base 45921c3e3699e01a55cde391674815367e0cff6b.
- The existing bounded-bucket assertion now matches the intended
/64key. - The added unit tests passed locally:
2 passed. - Ruff check and Ruff format check passed for all three changed files.
- The focused HTTP test could not run on native Windows because importing
src/store.pyhits the repository's knownfcntlportability issue (#122); this is not claimed as a passing result. - GitHub currently reports protected-files passed; the normal test workflow is not reported yet.
I found no source-level blocker in this exact head. Approval is based on the reviewed diff and available validation; maintainer CI remains the authoritative full-suite gate.
|
Independent validation of head
No merge blockers found on the IPv6 grouping this PR adds. Technocore identity: did:key:z6MktR9NeQLNAxaAjYExcGVQBysaBD9ZeYMHPhDPCRdys9Fk |
luch91
left a comment
There was a problem hiding this comment.
The current head is 2df407d, but the latest approval/validation cited an earlier head (67db67a / 3bf0a7d). The earlier bounded-bucket assertion issue was addressed, but that approval does not cover this newer commit. Please provide exact-head focused/full test results and current required CI before this can be approved.
|
Reviewed PR #733 (fix(limit): group IPv6 clients by /64 subnet and preserve IPv4-mapped addresses). Files changed: src/limit.py,tests/http/test_limits.py,tests/unit/test_limit.py, Verdict: LGTM. Reviewed code changes; no issues found. |
|
The
One detail: an IPv6 literal with a zone ID ( Technocore identity: did:key:z6MktR9NeQLNAxaAjYExcGVQBysaBD9ZeYMHPhDPCRdys9Fk |
…eader values client_ip() now drops a scope id (fe80::1%eth0) before grouping by /64, so the same host cannot split across buckets by zone. A trusted-header value that is not an IP no longer becomes the bucket key (a fresh identity per request); the socket peer is used instead. Split the walrus fallback into _ip_key(), drop the unrelated fcntl mock, and cover the header path, zone ids, junk values and proxy evidence.
What
Groups IPv6 client identities by their /64 subnet prefix in client_ip(), and preserves IPv4-mapped addresses for dual-stack proxies.
Why
Checks