Repository navigation
Prototype portable KV-backed Geo lookup - #454
Draft
ChristianPavilonis wants to merge 1 commit into
Draft
ChristianPavilonis wants to merge 1 commit into
ChristianPavilonis wants to merge 1 commit into
Conversation
This branch has not been deployed
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
KvHandle, with versioned binary range objects, digest validation and bounded optional object caching.Stack
Stacked on #439, with base
feature/pluggable-geo-providersat72ceed7e.This is a sibling alternative to the MMDB experiment in #453, not stacked on its implementation. Both retain the same pre-MMDB base. No existing stack branch is rebased or retargeted.
Changes
examples/geo-kv-prototype/KvHandlelookup, cache and CSV-oracle verification.examples/geo-kv-prototype/src/store.rsdocs/superpowers/specs/2026-11-05-kv-geo-design.mddocs/superpowers/plans/2026-11-05-kv-geo-prototype-results.mdProduction crates, workspace dependencies, request dispatch and existing Geo APIs are unchanged. CSV/import dependencies stay in the standalone prototype. No production dataset, generated index or download credentials are committed.
Measurements
Imported the permitted
GeoLite2-City-CSV_20261103release, containing 3,632,756 IPv4 and 2,091,942 IPv6 networks.Measurements use local artifact-file KV through
KvHandle. They do not establish cloud KV latency, cost, concurrency, propagation or cold-isolate behavior. See the measurement record and usage instructions.Issue scope
Refs #438 and #391. This draft only explores format and lookup; it does not complete the production GeoIP acceptance work or close an issue.
Test plan
Tested implementation:
e4ede101. Runtime source fingerprint is unchanged from the measured prototype; pre-PR updates only extend its verification record.cargo test --offline --locked --manifest-path examples/geo-kv-prototype/Cargo.toml: 10 passed.-D warnings, formatting, and locked release build.cargo test --offline --locked --workspace --all-targets: 2,115 passed, six existing tests ignored.cargo clippy --offline --locked --workspace --all-targets --all-features -- -D warnings.cargo fmt --all -- --checkand staged whitespace checks.cargo check --offline --locked --workspace --all-targets --features 'fastly cloudflare spin'.cargo check --offline --locked -p edgezero-adapter-spin --target wasm32-wasip2 --features spin.The current GitHub workflow base filters do not include
feature/pluggable-geo-providers, and the root workspace excludes this standalone crate. The commands above are local verification, not a claim of automatic GitHub prototype coverage. Automated coverage needs wiring before this becomes merge-ready production work.Open decisions and limitations
XKin 393 IPv4 and 68 IPv6 source networks, but core's country allowlist rejects it. The prototype preserves it in a source-format DTO and reportscore_country_supported: false, without changing production policy or silently dropping intervals. Decide production outcome handling explicitly.Checklist