Repository navigation
fix(healthcheck): support bracketed IPv6 targets and strip brackets before TCP connect - #5875
Merged
gabsprogrammer merged 1 commit intoSep 19, 2026
Conversation
…efore TCP connect
This was referenced Sep 19, 2026
Closed
Closed
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.
Why this matters
In
ods/scripts/healthcheck.py,_parse_target()only recognized colon-separated host:port shorthand if the target did not begin with[(":" in raw and not raw.startswith("[")). As a consequence, valid IPv6 endpoint targets passed in standard bracketed notation (e.g.[::1]:8080) were rejected withValueError: target must be http(s) URL, tcp://host:port, or host:port. Furthermore, when bracketed IPv6 addresses were parsed from explicittcp://[::1]:8080URLs,_parse_host_port()retained the enclosing brackets[::1], which causes standard socket connections (socket.create_connection(("[::1]", port))) to fail withsocket.gaierror: [Errno 8] nodename nor servname provided, or not known.This patch updates
_parse_target()to accept bracketed[ipv6]:portshorthand notation alongside standard hostname/IPv4 targets, and ensures_parse_host_port()strips enclosing brackets from IPv6 host addresses prior to opening the TCP socket connection.Validation
python3 ods/scripts/healthcheck.py [::1]:<port> --timeout 2; confirmed baseline raisedValueError: target must be http(s) URL, tcp://host:port, or host:port. When passedtcp://[::1]:<port>, baseline failed with socket gaierror due to unstripped brackets.ods/tests/test_healthcheck_ipv6.pypasses with exit code 0; TCP healthcheck successfully connects to listening IPv6 endpoints for both[::1]:portandtcp://[::1]:porttargets.Overlap check
ods/installers/macos/with zero overlap in scripts/healthcheck.py.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens target parsing and IPv6 TCP address resolution in the universal healthcheck utility, not runtime daemon execution. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.
Follow-up integration evidence
Composed with #5871 at 81b881c without conflicts. Production and test diffs passed together; network health probe contracts remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.