-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Enjoy a better diff viewing experience by clicking one of these URLs:
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First PR in a new stacked chain that will extract the net/URL validation helpers out of
miles_agent_server.pyinto anagent_server/net.pymodule. Tests-first, so the subsequent mechanical-move PRs are safe.What
New
tests/unit/test_miles_agent_server_net.py(37 tests) giving thorough coverage to the host/URL helpers that were previously almost untested (only_normalize_session_server_instance_idhad 2 tests in the existing suite):_normalize_host— IPv4/IPv6 compression, hostname lowercasing, empty/scoped/invalid rejection_format_host_port— IPv4, bracketed IPv6, hostname_parse_session_server_id— valid host:port, IPv6, and the scheme/path/missing-port rejections_normalize_session_server_instance_id— safe value, empty/space rejection, 128-char boundary_parse_url_origin— http/https default ports, explicit port, unsupported-scheme/missing-host/userinfo rejection_get_url_origin_id— composition + IPv6_resolve_host_ips(async) — IP-set extraction +gaierror→ValueError_hosts_overlap(async) — identical-host short-circuit, overlapping vs disjoint IP sets_validate_session_server_id(async) — success, port-mismatch, host-mismatchNotes
_resolve_host_ips/_hosts_overlapat the module level; when the helpers move toagent_server/net.pyin the follow-up PRs, those patch targets get repointed (patch-where-used).Tests
37 passedfor the new file; fulltests/unitsuite green (2854 passed, 1 skipped); ruff clean.