From fc0f3bc465f889d540b310ab0aba60a068dcfe63 Mon Sep 17 00:00:00 2001 From: Craig Munro Date: Sun, 8 Nov 2026 23:16:55 -0500 Subject: [PATCH] chore: prepare cidrwalk 0.3.0 release Update the executable version and its test, add migration notes for contextual network endpoints and validation, and align release examples. --- .github/workflows/release.yml | 2 +- Documentation/ReleaseNotes/0.3.0.md | 46 +++++++++++++++++++++++++ README.md | 2 +- Sources/cidrwalk/cidrwalk.swift | 2 +- Tests/cidrwalkTests/cidrwalkTests.swift | 2 +- 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 Documentation/ReleaseNotes/0.3.0.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1db005b..11b639a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: version: description: Semantic version to dry-run, without a leading v required: true - default: 0.2.0 + default: 0.3.0 type: string push: tags: diff --git a/Documentation/ReleaseNotes/0.3.0.md b/Documentation/ReleaseNotes/0.3.0.md new file mode 100644 index 0000000..854d324 --- /dev/null +++ b/Documentation/ReleaseNotes/0.3.0.md @@ -0,0 +1,46 @@ +# cidrwalk 0.3.0 + +`cidrwalk` 0.3.0 adopts `swift-cidr` 0.9 and makes network range endpoints +retain their input prefix context. This release intentionally changes +network-mode JSON boundaries and rejects redundant network pairs. + +## Output compatibility + +- In network mode, `rangeStart` is the lowest first address and `rangeEnd` is + the highest last address across the inputs. Each boundary retains the prefix + length of the network that supplies it, rather than becoming `/32` or `/128`. +- For `10.0.0.0/24` and `10.0.2.0/25`, the JSON boundaries are + `10.0.0.0/24` and `10.0.2.127/25`. The summarized prefixes remain + `10.0.0.0/23` and `10.0.2.0/25`. +- For `2001:db8::/126` and `2001:db8::8/127`, the JSON boundaries are + `2001:db8::/126` and `2001:db8::9/127`. +- JSON field names are unchanged. The `inputs` array preserves canonical + networks in command-line order. Reversing valid inputs preserves the + boundaries and summarized prefixes. +- Address mode still requires `/32` or `/128` host endpoints. Deterministic + IPv6 text and the envelope summarization algorithm are unchanged. + +## Input validation + +- Network inputs must use the same address family, be different after + canonicalization, and neither may contain the other. +- Equal, canonically equivalent, and nested network pairs now produce a + validation error on stderr, a nonzero exit status, and no summary output. + Mixed-family inputs continue to be rejected. +- Distinct adjacent networks and host-length networks remain valid. +- The summary covers the entire envelope between the boundaries, including + any gap between the two networks. + +## Dependency boundary + +- The `swift-cidr` requirement is now `>= 0.9.0` and `< 0.10.0`. +- `Package.resolved` records the reviewed `swift-cidr` 0.9.0 implementation. +- Building from source now requires Swift 6.2 or newer. + +## Release integrity + +- Signed annotated tags are verified before packaging. +- Native macOS and Linux archives are provided for arm64 and x86-64, with + `LICENSE`, `THIRD_PARTY_NOTICES.txt`, and a shared `SHA256SUMS` file. +- Linux archives statically include the Swift runtime and are checked in + Ubuntu 22.04 containers without a Swift installation. diff --git a/README.md b/README.md index ad7aab6..874e0d7 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ plain `swift test` cannot locate `Testing.framework`. Maintainers can validate a committed release candidate from a clean worktree: ```bash -./scripts/check-release.sh 0.2.0 +./scripts/check-release.sh 0.3.0 ``` The release workflow's manual dispatch builds and inspects the same four diff --git a/Sources/cidrwalk/cidrwalk.swift b/Sources/cidrwalk/cidrwalk.swift index e10b053..f2b7b2e 100644 --- a/Sources/cidrwalk/cidrwalk.swift +++ b/Sources/cidrwalk/cidrwalk.swift @@ -17,7 +17,7 @@ import Foundation @main struct CIDRWalk: ParsableCommand { - static let version = "0.2.0" + static let version = "0.3.0" static let configuration = CommandConfiguration( commandName: "cidrwalk", diff --git a/Tests/cidrwalkTests/cidrwalkTests.swift b/Tests/cidrwalkTests/cidrwalkTests.swift index 8645f33..bb71800 100644 --- a/Tests/cidrwalkTests/cidrwalkTests.swift +++ b/Tests/cidrwalkTests/cidrwalkTests.swift @@ -18,7 +18,7 @@ import Testing @Test("Root command exposes release version") func rootCommandExposesReleaseVersion() { - #expect(CIDRWalk.version == "0.2.0") + #expect(CIDRWalk.version == "0.3.0") } @Test("Root command accepts long and short version flags")