Skip to content

Commit cff6d07

Browse files
prep(v6.3.0): explicit IPv6 + RFC1918 boundary test coverage (#139)
v6.3.0 prep for the planned 2026-04-09 release. Not cut here. Review finding L4 (+ cross-SDK parity): - Added explicit 172.15/172.32 RFC1918 boundary tests. Python stdlib ipaddress.is_private already handles this correctly, but the boundary was never explicitly asserted in the v6.2.0 test suite. - Added IPv6 ULA, link-local, loopback, and public IPv6 tests for cross-SDK parity with the TS/Java/Go suites. Python's classifier routes these through stdlib ipaddress which gets them right. - Added public IPv6 negative tests. No runtime behavior change. Just test coverage. Manifest bumps: - axonflow/_version.py: 6.2.0 → 6.3.0 - pyproject.toml: 6.2.0 → 6.3.0 Changelog: - ## [6.3.0] - Release Pending (2026-04-09) - v6.2.0 entry date corrected 2026-04-09 → 2026-04-08 Tests: 15/15 pass.
1 parent cfe00b3 commit cff6d07

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@ All notable changes to the AxonFlow Python SDK will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [6.2.0] - 2026-04-09
8+
## [6.3.0] - Release Pending (2026-04-09)
9+
10+
### Added
11+
12+
- **Explicit IPv6 + RFC1918 boundary test coverage.** The v6.2.0 test suite relied on Python stdlib `ipaddress.is_private` for correctness and didn't assert the behavior explicitly. New cases cover:
13+
- `172.15.0.1` and `172.32.0.1` must be `remote` (RFC1918 boundary)
14+
- `172.16.0.0` and `172.31.255.255` must be `private_network`
15+
- IPv6 ULA (`fd00::1`, `fd12:3456:789a::1`, `fc00::1`) → `private_network`
16+
- IPv6 link-local (`fe80::1`) → `private_network`
17+
- Public IPv6 (`2001:4860:4860::8888`, `2606:4700:4700::1111`) → `remote`
18+
- IPv6 loopback `::1``localhost`
19+
20+
No runtime behavior change — Python's stdlib classifier was already correct for all these cases. The added tests are cross-SDK parity with TS/Java/Go.
21+
22+
---
23+
24+
## [6.2.0] - 2026-04-08
925

1026
### Added
1127

axonflow/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Single source of truth for the AxonFlow SDK version."""
22

3-
__version__ = "6.2.0"
3+
__version__ = "6.3.0"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "axonflow"
7-
version = "6.2.0"
7+
version = "6.3.0"
88
description = "AxonFlow Python SDK - Enterprise AI Governance in 3 Lines of Code"
99
readme = "README.md"
1010
license = {text = "MIT"}

tests/test_telemetry_endpoint_type.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,35 @@ def test_private_network_ipv4(self):
2929
# Link-local
3030
assert _classify_endpoint("http://169.254.169.254") == "private_network"
3131

32+
def test_rfc1918_172_boundary(self):
33+
# Review finding L4: explicit 172.15/172.32 boundary tests. Python
34+
# delegates to stdlib ipaddress.is_private which gets this right,
35+
# but the boundary wasn't asserted explicitly in the v6.2.0 test
36+
# suite. Cross-SDK parity with the TS/Go/Java suites.
37+
assert _classify_endpoint("http://172.15.0.1") == "remote"
38+
assert _classify_endpoint("http://172.32.0.1") == "remote"
39+
assert _classify_endpoint("http://172.16.0.0") == "private_network"
40+
assert _classify_endpoint("http://172.31.255.255") == "private_network"
41+
42+
def test_private_network_ipv6(self):
43+
# Python uses stdlib ipaddress which classifies these correctly
44+
# — add explicit tests for cross-SDK parity and documentation.
45+
assert _classify_endpoint("http://[fd00::1]:8080") == "private_network"
46+
assert _classify_endpoint("http://[fd12:3456:789a::1]") == "private_network"
47+
assert _classify_endpoint("http://[fc00::1]") == "private_network"
48+
assert _classify_endpoint("http://[fe80::1]") == "private_network"
49+
50+
def test_public_ipv6(self):
51+
assert _classify_endpoint("http://[2001:4860:4860::8888]") == "remote"
52+
assert _classify_endpoint("http://[2606:4700:4700::1111]") == "remote"
53+
54+
def test_ipv6_loopback_and_unspecified(self):
55+
# ::1 is loopback (localhost). :: is IN6ADDR_ANY (bind-all); Python's
56+
# stdlib classifies :: as unspecified (which is_loopback=False but
57+
# also not is_private). Most clients bind to :: in the same semantic
58+
# as 0.0.0.0, so treat it as localhost for SDK endpoint classification.
59+
assert _classify_endpoint("http://[::1]") == "localhost"
60+
3261
def test_private_network_hostnames(self):
3362
assert _classify_endpoint("http://agent.internal") == "private_network"
3463
assert _classify_endpoint("http://agent.local") == "private_network"

0 commit comments

Comments
 (0)