feat(tracer): validated public IP seeding via seedPublicIP - #81
Merged
Conversation
dweekly
force-pushed
the
feat/network-scoped-rdns
branch
from
September 3, 2026 00:18
3537be7 to
fb9a55a
Compare
dweekly
force-pushed
the
feat/seed-public-ip
branch
2 times, most recently
from
September 3, 2026 00:24
9515dec to
cc67069
Compare
dweekly
force-pushed
the
feat/network-scoped-rdns
branch
from
September 3, 2026 01:44
fb9a55a to
3bdb60b
Compare
dweekly
force-pushed
the
feat/seed-public-ip
branch
from
September 3, 2026 01:44
cc67069 to
5244313
Compare
dweekly
force-pushed
the
feat/network-scoped-rdns
branch
from
September 3, 2026 01:49
3bdb60b to
65bbbda
Compare
dweekly
force-pushed
the
feat/seed-public-ip
branch
from
September 3, 2026 01:50
5244313 to
deb2c3a
Compare
…t global exceptions
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.
Summary
Implements phase 3 of Cache and Network-Transition Lifecycle from docs/CACHE-AND-TRANSITION-LIFECYCLE.md:
PublicIPSource: Enum identifying the origin of a dynamically seeded public IP (.validatedCallerCache,.gatewayReported).seedPublicIP(_:source:): Actor-isolated method to provide a known-valid public IP so the next classified trace skips discovery.100.64.0.0/10, link-local, loopback, ULA, multicast), malformed strings, and placeholder sentinels like"unknown".inet_ntopformat.invalidatePublicIP(),clearCaches(),networkChanged()) cleanly discard it.SwiftFTRConfig.publicIPdocstring to clarify that it is an authoritative, immutable configuration override that permanently bypasses discovery, and points callers toseedPublicIP(_:source:)for dynamic seeding across transitions.Stacked on top of #80 (
feat/network-scoped-rdns).Testing
CacheGenerationTests.swift:seedValidPublicIP: Verifies seeding valid IPv4 and IPv6 strings (including non-canonical formatting normalized to canonicalinet_ntop).seedRejectsNonGlobalAndSentinels: Verifies rejection of RFC 1918, CGNAT, link-local, loopback, ULA, multicast, and sentinel strings like"unknown", ensuring existing cached value is untouched.seedInvalidationLifecycle: Verifies thatinvalidatePublicIP(),clearCaches(), andnetworkChanged()all clear the seeded public IP.seedBypassesDiscovery: Verifies thateffectivePublicIPForClassificationskips discovery when seeded.--warnings-as-errors; formatting checked withswift format lint --strict.