Skip to content

Adopt swift-cidr 0.9.0 and preserve network endpoint prefixes - #2

Merged
camunro merged 1 commit into
mainfrom
codex/reapply-swift-cidr-0.9.0
Nov 9, 2026
Merged

camunro merged 1 commit into
mainfrom
codex/reapply-swift-cidr-0.9.0

Conversation

@camunro

@camunro camunro commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Upgrade cidrwalk to swift-cidr 0.9.x and CIDRForm, with Swift 6.2 as the minimum toolchain. Align CI, release checks, notices, and documentation with the dependency.

Network summaries select the lowest first address and highest last address while retaining each boundary's input prefix. For example, 10.0.0.0/24 and 10.0.2.0/25 produce boundaries 10.0.0.0/24 and 10.0.2.127/25. Equal, canonically equivalent, contained, and mixed-family pairs are rejected before output. Reversing valid inputs preserves the boundaries and summary prefixes; JSON retains the original input order.

Validation of the reviewed content:

  • 22 Debug tests and 22 Release tests passed.
  • 230 CLI checks passed across both configurations, covering IPv4/IPv6, reversed inputs, contextual JSON endpoints, and validation failures.
  • This PR's signed head commit 005e73f has the exact tree and patch of reviewed commit 15aae0c; local tests were not repeated for the identical reapplication. GitHub CI will validate the new PR head.

This reapplies 15aae0c after signed revert a6bcc57 restored the prior main tree, so the change can go through PR review without rewriting history.

Migrate to CIDRForm and Swift 6.2, align release tooling and notices,
and retain each selected boundary address's input prefix in JSON.
Reject equal, canonically equivalent, contained, and mixed-family
network pairs before rendering any summary.

Cover IPv4 and IPv6 endpoints, reversed inputs, and validation errors.
Validation: 22 Debug tests, 22 Release tests, and 230 CLI checks passed.

(cherry picked from commit 15aae0c)
@camunro
camunro merged commit a36a1a4 into main Nov 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant