Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6e8bb0e
Prototype portable KV-backed Geo indexing and lookup
ChristianPavilonis Nov 5, 2026
c155e5d
fix(geo): refresh prototype lockfile for current core
ChristianPavilonis Nov 10, 2026
479d993
Merge inherited provider build fixes below KV Geo prototype
ChristianPavilonis Nov 10, 2026
c52bdaf
Carry inherited readiness fixes below standalone KV Geo prototype
ChristianPavilonis Nov 10, 2026
44b6f0d
Carry authenticated head preparation through Geo providers
ChristianPavilonis Nov 12, 2026
efb07b6
Carry prepared-router installation through the review stack
ChristianPavilonis Nov 12, 2026
09a24c0
Merge current parent repairs into PR 454
ChristianPavilonis Nov 12, 2026
3ac2168
Retain AWS fixture lifetime repair in PR 454
ChristianPavilonis Nov 12, 2026
e043f93
Retain callback-scope fixture repair in PR 454
ChristianPavilonis Nov 12, 2026
4524e10
Merge owned cutover follow-up through PR 454
ChristianPavilonis Nov 13, 2026
468dba5
Merge PR #439 into PR #454 for outbound compatibility stack
ChristianPavilonis Nov 13, 2026
2c41968
Report Fastly and Cloudflare platform geo through ctx.geo()
dhruv8sh Nov 13, 2026
7ef4766
Bind Axum geo from the manifest and EDGEZERO__ADAPTER__GEO settings
dhruv8sh Nov 13, 2026
e36beab
Merge branch 'feat/kv-record-contract' into reconcile/records-kv-geo-454
ChristianPavilonis Nov 14, 2026
8a0b3f2
Merge branch 'feat/kv-record-contract' into reconcile/records-kv-geo-454
ChristianPavilonis Nov 16, 2026
2b4e4bf
Merge branch 'feat/kv-record-contract' into reconcile/records-kv-geo-454
ChristianPavilonis Nov 16, 2026
8cd7af9
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 16, 2026
e098b38
Merge stock celld record service into the KV Geo candidate
ChristianPavilonis Nov 16, 2026
62db505
Merge current record validation fixes into KV Geo
ChristianPavilonis Nov 17, 2026
5218a20
Reconcile Geo manifest and settings selection for KV Geo
ChristianPavilonis Nov 17, 2026
7c0cd31
Serve pinned CSV geography through EdgeZero KV
ChristianPavilonis Nov 17, 2026
1b7eeb8
Cover compiled-out Geo and rendered docs in CI
ChristianPavilonis Nov 17, 2026
570ff29
Check Geo fixture without optional provider features
ChristianPavilonis Nov 17, 2026
925fe01
Default to 16 KiB KV Geo objects from backend evidence
ChristianPavilonis Nov 17, 2026
e68a078
Merge PR #510 into PR #454 for outbound compatibility stack
aram356 Nov 25, 2026
bbcb3d0
Update url to 2.5.9 in the geo-kv-prototype lockfile
aram356 Nov 25, 2026
0190f77
Merge PR #510 into PR #454 for outbound compatibility stack
aram356 Nov 25, 2026
96b9f79
Merge PR #510 into PR #454 for outbound compatibility stack
aram356 Nov 26, 2026
00091a6
Send the KV geo listener's rejected request to the live host's address
aram356 Nov 26, 2026
7580806
Merge PR #510 into PR #454 for outbound compatibility stack
aram356 Nov 26, 2026
915e935
Address KV Geo startup, artifact, and documentation review
ChristianPavilonis Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
run: |
cargo fetch --locked
cargo fetch --locked --manifest-path examples/app-demo/Cargo.toml
cargo fetch --locked --manifest-path examples/geo-kv-prototype/Cargo.toml
cargo fetch --locked --manifest-path crates/edgezero-test-harness/fixtures/reusable-app/Cargo.toml
cargo fetch --locked --manifest-path crates/edgezero-test-harness/Cargo.toml
cargo fetch --locked --manifest-path crates/edgezero-test-harness/fixtures/request-fidelity/Cargo.toml
Expand Down Expand Up @@ -215,6 +216,19 @@ jobs:
- name: Native Geo real-peer hosting (loopback only)
run: scripts/run_test_nonzero.sh geo_hosting_proves_real_peer_and_shared_outcome cargo test --offline --locked -p edgezero-adapter-axum --no-default-features --features geo-cloudfront,test-utils --test production_hosting geo_hosting_proves_real_peer_and_shared_outcome

- name: Portable KV Geo and managed listener (loopback only)
if: matrix.suite == 'workspace'
run: |
cargo fmt --manifest-path examples/geo-kv-prototype/Cargo.toml -- --check
cargo clippy --offline --locked --manifest-path examples/geo-kv-prototype/Cargo.toml --all-targets --all-features -- -D warnings
cargo test --offline --locked --manifest-path examples/geo-kv-prototype/Cargo.toml
cargo test --offline --locked --manifest-path examples/geo-kv-prototype/Cargo.toml --all-features
node --test scripts/run_geo_kv_integration.test.mjs
Comment thread
ChristianPavilonis marked this conversation as resolved.
Resolved
scripts/run_test_nonzero.sh conflicting_rebuild_keeps_the_existing_pin_readable cargo test --offline --locked -p edgezero-core --features geo-kv-build --lib geo::kv
scripts/run_test_nonzero.sh geo_kv_manifest_defaults_and_overrides_require_usable_forwarding cargo test --offline --locked -p edgezero-adapter-axum --features geo-kv --lib geo_kv_manifest_defaults_and_overrides_require_usable_forwarding
cargo check --offline --locked -p edgezero-core --no-default-features --features geo-kv --target wasm32-unknown-unknown
scripts/run_test_nonzero.sh kv_geo_listener_checks_reader_provenance_and_pinned_objects cargo test --offline --locked -p edgezero-adapter-axum --features geo-kv,geo-cloudfront,test-utils --test production_hosting kv_geo

- name: Native Geo public examples
run: cargo test --offline --locked -p edgezero-adapter-axum --features geo-cloudfront --doc

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## Unreleased

### KV-backed Geo

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Conflicts with the current base

feat/kv-record-contract is now at a839312d. It adds a ### Portable conditional KV records section at this same spot under ## Unreleased, and git merge-tree reports a content conflict here. This is the only file changed on both sides.

Fix: merge the current base and keep both sections, records first then KV-backed Geo, or whatever order you prefer.


- Axum can opt into lookup from a pinned KV dataset with the `geo-kv` feature. Off is still
the default. See the [native Geo guide](docs/guide/native-geo.md#serve-a-csv-backed-kv-index)
for setup and request budgets.
- `GeoUnavailableReason` adds `MissingReaderIp`, `NoMatch`, and `UnsupportedGeography` and is
now non-exhaustive. Handle the new reasons where relevant and keep a wildcard that treats
unknown reasons as unavailable. Add wildcard arms to exhaustive matches on `GeoSource` and
`GeoTrustBasis` when upgrading from the earlier CloudFront-only API. Axum callers that
match `NativeGeoSelection` or `NativeGeoConfigError` must also account for the new KV
variants.
- `kv` is reserved for the built-in provider. If an application uses `kv` as a supplied
provider label, rename it to an application-specific value, such as `example.kv`.

### Axum buffered JSON limits and body API

Axum now defaults framework-managed JSON buffering to 2 MiB, exactly 2,097,152 bytes.
Expand Down
3 changes: 2 additions & 1 deletion crates/edgezero-adapter-axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ aws-dynamodb-records = ["aws-dynamodb", "edgezero-store-aws/dynamodb-records"]
celld-kv = ["axum", "edgezero-store-celld/kv"]
celld-records = ["celld-kv", "edgezero-store-celld/records"]
geo-cloudfront = ["axum"]
geo-kv = ["axum", "edgezero-core/geo-kv"]
cli = [
"native-bindings",
"dep:edgezero-adapter",
Expand Down Expand Up @@ -121,7 +122,7 @@ required-features = ["celld-kv", "test-utils"]
async-trait = { workspace = true }
axum = { workspace = true, features = ["macros"] }
edgezero-adapter-cloudflare = { path = "../edgezero-adapter-cloudflare", default-features = false }
edgezero-core = { path = "../edgezero-core", features = ["test-utils"] }
edgezero-core = { path = "../edgezero-core", features = ["test-utils", "geo-kv-build"] }
flate2 = { workspace = true }
http-body = { workspace = true }
httparse = { workspace = true }
Expand Down
23 changes: 16 additions & 7 deletions crates/edgezero-adapter-axum/src/dev_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use crate::diagnostics::{NativeDiagnosticsHandle, NativeSession};
use crate::outbound_executor::{AxumOutboundExecutor, AxumOutboundExecutorHandle};
pub use crate::run_options::AxumRunOptions;
use crate::run_options::{
JsonBodyLimit, config_path, failure, native_limit_setting, native_settings, shutdown_grace,
JsonBodyLimit, config_path, failure, geo_setting, native_limit_setting, native_settings,
shutdown_grace,
};
use crate::trusted_proxy::TrustedProxyPolicy;
use anyhow::Context as _;
Expand All @@ -51,6 +52,7 @@ use edgezero_core::config_store::{ConfigStoreError, ConfigStoreHandle, ConfigSto
use edgezero_core::env_config::EnvConfig;
use edgezero_core::key_value_store::KvHandle;
use edgezero_core::logging::{BOOT_LOG_LEVEL, BOOT_LOG_TARGET, resolve_logging_level};
use edgezero_core::manifest::BakedManifest;
#[cfg(test)]
use edgezero_core::router::RouterService;
use edgezero_core::secret_store::SecretHandle;
Expand All @@ -66,7 +68,7 @@ use tokio::time::{Instant as NativeInstant, sleep_until};
use crate::config_store::AxumConfigStore;
use crate::config_store_limits::ConfigStoreLimits;
use crate::connection::{ConnectionExit, serve_http1_with_shutdown};
use crate::geo::NativeGeo;
use crate::geo::{self, NativeGeo};
use crate::ingress_config::AxumIngressConfig;
use crate::key_value_store::PersistentKvStore;
use crate::native_stores::{self, NativeSourcePlan, NativeStoreOverrides, NativeStoreSource};
Expand Down Expand Up @@ -1059,7 +1061,10 @@ where
A: Hooks,
F: FnOnce() -> anyhow::Result<()>,
{
let (env, json_body_limit, native) = capture_dev_environment(vars_os())?;
let (env, json_body_limit, mut native) = capture_dev_environment(vars_os())?;
// The dev server ignores the manifest table: its deployment-only values are
// usually absent locally. Settings alone opt a dev run into geo.
let geo = geo::resolve(None, &env, &BakedManifest::Absent, &native.policy)?;
if !A::owns_logging() {
app_logger(&env)
.init()
Expand Down Expand Up @@ -1094,6 +1099,8 @@ where
config: build_config_registry(metadata.config, &env, config_limits)?,
secrets: build_secret_registry(metadata.secrets, &env),
};
let max_object_bytes = geo.max_object_bytes(None)?;
native.geo = geo.prepare(stores.kv(), max_object_bytes).await?;
prepare_transport(app, stores, json_body_limit, native)
},
)
Expand All @@ -1120,7 +1127,7 @@ where
["adapter", "trusted_proxy_cidrs"] => Some("TRUSTED_PROXY_CIDRS"),
["adapter", "forwarding_header_family"] => Some("FORWARDING_HEADER_FAMILY"),
["logging", "request_records"] => Some("LOGGING__REQUEST_RECORDS"),
_ => None,
_ => geo_setting(&path),
}
})
});
Expand Down Expand Up @@ -1319,12 +1326,12 @@ where
&'startup PreparedStores,
) -> LocalStartupFuture<'startup>,
{
let geo = options.native_geo()?;
let native = NativeHosting {
let geo = options.native_geo(&A::manifest())?;
let mut native = NativeHosting {
diagnostics: options.diagnostics(),
policy: options.trusted_proxy_policy(),
request_records: options.request_records(),
geo,
geo: NativeGeo::default(),
};
run_local(
ListenerSource::Bind(options.addr()),
Expand All @@ -1335,6 +1342,7 @@ where
async move {
let metadata = A::stores();
let sources = NativeSourcePlan::validate(metadata, &options, overrides)?;
let max_object_bytes = geo.max_object_bytes(Some(&sources))?;
init_logging::<A>(options.logging_level())?;
let mut app = App::build::<A>(crate::AXUM_PLATFORM)
.map_err(|_error| anyhow::anyhow!("application configuration failed"))?;
Expand All @@ -1345,6 +1353,7 @@ where
app.record_store_requirements(),
)
.await?;
native.geo = geo.prepare(stores.kv(), max_object_bytes).await?;
let transport = AxumOutboundClient::try_transport()
.map_err(|_error| failure("transport", "HTTP client", "initialization failed"))?;
initialize(&mut app, &stores).await.map_err(|error| {
Expand Down
Loading