Skip to content

Add native AWS store providers - #414

Open
ChristianPavilonis wants to merge 47 commits into
issue-397-diagnostics-proxy-trust-specfrom
issue-410-native-store-providers
Open

ChristianPavilonis wants to merge 47 commits into
issue-397-diagnostics-proxy-trust-specfrom
issue-410-native-store-providers

Conversation

@ChristianPavilonis

@ChristianPavilonis ChristianPavilonis commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Current review readiness

Ready for review. Required current-head CI passed at c66f93f118141a2ed7469a8ab96b12902f3854e6: test run 42924131967.

Minimal fixes originate in #414 and are merged upward:

  • Typed SDK connector timeouts map to Deadline; non-timeouts remain Unavailable. The previously failing hosted timeout test and all 78 provider cases now pass without assertion, retry or duration changes.
  • Fresh consumers use the existing locked SDK cohort: optional native aws-types =1.6.0 and aws-smithy-runtime-api =1.19.0. This prevents the schema mismatch and preserves the explicit older behavior version instead of switching retry policy or suppressing deprecations. A fresh consumer passes with compiler and Clippy warnings denied throughout.
  • The constructor-boundary test attempts the full upload while independently reading and requiring a complete, finite expected response. The existing startup-readiness poll treats a connection reset as not yet HTTP-ready within its unchanged deadline; success still requires a complete HTTP200 and the original payload checks. Production transport and limits are unchanged.

Local final-top Axum checks pass 488 unit, 28 contract, six AWS startup, four celld startup and 36 hosting cases. Final-top workspace strict Clippy and formatting pass. The prior stable checkpoint passed all six mandatory commands; unchanged inputs retain their receipts, while fresh current-head CI checks the combined state. The current ready state supersedes historical draft-only prerequisites below; unexecuted deployment acceptance is not claimed complete. An additional Fastly WASM runtime job was still running at transition and is not counted as passed. No TS work or deployment qualification is a review prerequisite. Integration #462 remains draft; reviewers aram356, prk-Jr and dhruv8sh remain requested. Stack465 and PR bases are unchanged; #453 is excluded.

Current review-stack checkpoint

Publication head: c66f93f118141a2ed7469a8ab96b12902f3854e6. This cleanup preserves the existing feature unit and PR identity. The additional change is the completed generated-native build correction: image-only code now follows the scaffold's existing Fastly-example selection, with no request-policy change. Its focused generator/native proof is retained; fresh per-branch hosted checks are not assumed green.

Review order: #275 → #406 → #407 → #409 → #414 → #422 → #439 → #454. Draft integration checkpoint: #462. New SDK/group/codec/phase development and unrelated TS work are not prerequisites or additions to this PR. Earlier notes below retain their original tested revisions and limits; they are not a whole-tree pass for this new head.

Earlier implementation and proof notes

RC refresh checkpoint, 2026-11-10

Current head: 48761e3e528eae0481e9f6e2eb30c0002f00d239.

Only the AWS provider delta is replayed onto the updated hosting/diagnostic stack. Duplicate historical foundation/hosting commits are omitted. Explicit production options and initializer startup have a TCP no-ambient-merge regression. Ordinary test PR coverage remains unfiltered; an old donor filter was removed again.

Feature proof passes 417 Axum unit, 5 AWS startup, 33 hosting, 74 AWS provider, 256 CLI unit and 15 Node runner cases, scoped strict Clippy and SDK-isolation checks. Parent namespace/CI composition reruns pass all 5 AWS startup, 33 hosting and 35 Node CI cases. All five tracked locked fetches pass.

Generated native consumer/DynamoDB and pinned disposable-service runtime proofs are still pending integration execution. Bounded retained SDK values are not an RSS cap; timeout cancellation does not prove blocking credential work stopped. AWS clients intentionally retain their normal credential chain, separate from explicit hosting-source selection. No cloud acceptance is claimed.

Draft pending fresh hosted checks and the combined RC audit. Two unchanged native default-parallel deadline misses remain recorded and unclassified; serial passes and untouched-foundation parallel passes do not clear them. No timing bound was relaxed. No deployment, main merge, security-alert dismissal or review-thread resolution occurred. Historical design/review context follows.


Summary

  • Select local, supplied or built-in native stores independently per logical ID, without changing portable store traits or requiring Send setup futures.
  • Add default-off AppConfig Agent and Secrets Manager immutable startup snapshots, plus independently selected live DynamoDB ordinary KV.
  • Preserve shared config/secret preparation quotas/deadlines and complete registries before the application initializer/listener. Wire generated features, SDK-free structural CLI validation and AWS-bound config-push refusal.

Design and boundaries

This adds native store providers, not a new HTTP runtime. edgezero-store-aws implements the existing core store traits and does not depend on Axum. Axum owns provider selection and startup composition; core owns portable handles, per-ID registries and typed configuration resolution.

The portable edgezero.toml declares logical store IDs and defaults. AWS resource references belong in a separate versioned native bindings document, selected through an absolute file path in EDGEZERO__STORE_BINDINGS_FILE or through explicit AxumRunOptions. Applications can also supply ready handles or non-Send deferred setup, without a plugin registry.

Each declared ID selects one supplied, explicitly bound or implicit local source. Supplied/file collisions and undeclared IDs are rejected. The runner validates all sources before opening runner-owned local stores or polling deferred setup. CONFIG_DIR/DATA_DIR are required only for remaining local bindings. An unavailable selected provider fails startup; it never falls back to local data.

Provider Store contract Runtime behavior
AppConfig Agent Whole-document ConfigStore reads Immutable startup snapshot; restart to adopt changes
Secrets Manager Whole-value SecretStore reads Immutable startup snapshot; restart to adopt changes
DynamoDB Ordinary KvStore operations Live storage with fresh per-operation budgets
flowchart TD
    Bindings[Bindings and supplied inputs] --> Validate[Validate sources and compiled providers]
    Validate --> Prepare[Assemble app and prepare stores in the native runtime]
    Prepare --> Registries[Complete per-ID registries]
    Registries --> Initialize[Run app-owned initializer when supplied]
    Initialize --> Serve[Bind listener and serve requests]
Loading

One shared AWS preparation session owns startup budgets, client reuse and snapshot deduplication. The initializer receives the same registries used by requests. The application chooses its required config keys, schemas, secret checks and retained startup state; the framework does not infer those requirements or promise an atomic revision across remote resources.

AWS features are default-off and native-only. Existing entrypoints retain their local defaults; newly generated entrypoints select strict startup only when the bindings-file locator is present. Trusted Server adoption is separate work, and this does not claim a source-compatible upgrade from older EdgeZero versions across the #275/#406 prerequisites.

Diagnostic limitation: EdgeZero-owned errors/debug output discard or redact provider details. AWS SDK/dependency DEBUG/TRACE is not suppressed and can expose resource names and credential-source metadata. DynamoDB model Debug can also expose item keys and values, including binary hex, without enabling sensitive-body logging. LOG_SENSITIVE_BODIES=true can expose further response details. Operators must review dependency logging filters. No scoped/global subscriber suppression or application-wide logging policy is installed.

Stack and scope

Existing draft stack member based on docs/outbound-http-spec / #275 at ea66eff045512cccc60646d6ec339e83ff44fed7, with the compatible #406 production lifecycle bridge. Neither prerequisite PR was rewritten or merged. The user approved adding DynamoDB on this same branch/PR and committing/pushing it after checks.

Real AWS/IAM/capacity/deployment/image acceptance remains explicitly excluded. No real AWS service calls, infrastructure changes, image pulls or deployments were performed. SDK fixtures use dummy credentials, isolated or bypassed profile discovery, and literal-loopback endpoints.

DynamoDB KV

  • Independent default-off dynamodb-kv provider / generated aws-dynamodb feature; existing aws-stores remains AppConfig Agent + Secrets Manager only.
  • Strict v1 [kv.<id>] binding with explicit region/table/physical namespace, no credential or endpoint fields. Normal operator-owned SDK credential/endpoint policy remains supported.
  • Operator-owned ACTIVE, single-region, unindexed String pk/sk table; bounded DescribeTable preflight, exact table-name/schema checking, no provisioning or local fallback. All-remote KV needs no DATA_DIR.
  • Exact UTF-8 keys and arbitrary/empty binary values; 384 KiB payload cap. Millisecond logical expiry plus rounded-up service TTL; ordinary Put clears expiry and expired reads never delete renewed rows.
  • Strong Get/ascending base-table Query, one Query per page, scoped/versioned bounded cursors. Short/empty pages with continuation are valid. No CAS, atomic read-modify-write, snapshot pages or distributed identity-graph guarantee.
  • Fresh bounded runtime deadlines; one SDK attempt, no retry loop. Put/Delete can commit before returning an error. DescribeTable does not certify deployed IAM/write permissions/capacity.

DynamoDB is live storage, not a retained startup snapshot. The existing default 8 MiB retained-payload cap is per shared config/secret preparation session, not process/RSS or live database contents. Config/secrets still adopt remote changes only on restart; no live config/secret refresh or mutation is added.

Bindings validation remains structural-only / provider availability unknown. No offline Cargo resolver or guessed availability verdict is shipped. Custom shell actions remain untouched.

Verification

Original snapshot phase: all 24 post-rebase gates passed at its recorded source checkpoint; historical evidence remains in the original spec/plan and /tmp/native-store-integration/final-checks/. This does not claim those old results prove the later DynamoDB edits.

DynamoDB extension: 20 code gates plus docs lint/full-format/build passed, against an archived exact staged source tree independent of eight pre-existing dirty files. SHA-256 input manifests matched; later publication-record edits are Markdown-only.

  • Workspace default tests: 1,999 passed, 0 failed, 16 ignored; required native/provider feature scopes and generated consumers executed separately, not a claim that every unrelated ignored test ran.
  • Provider library: DynamoDB 44, Agent 26, Secrets 26, combined 74.
  • Native DynamoDB-only library 229; all-feature native test/doc suites 302.
  • Actual CLI-generated DynamoDB consumer: default-off refusal before SDK I/O, enabled put/get/list/TTL-write/read, retained data after restart, and delete.
  • Existing actual CLI-generated AppConfig/Secrets consumer rerun successfully.
  • Strict workspace all-target/all-feature Clippy; isolated provider scopes; native default Clippy; strict provider/native rustdoc; fmt.
  • SDK isolation, unchanged aws-stores membership, Cloudflare/Fastly/Spin WASM checks.
  • Actual SDK wire/shared KV contracts, Unicode NFC/NFD, binary/empty/size/key boundaries, millisecond expiry/renewal/reset, malformed expiry, short/empty continuation pages, cursor/table scope, closed denial/missing/stall errors.
  • Ambiguous Put/Delete fixtures apply the mutation before a scripted 500, then verify Unavailable, one attempt and the retained/removed row. SDK model Debug disclosure is directly asserted.
  • Mixed DynamoDB/local/ready/non-Send deferred source validation without polling/opening another local store; existing generic native staging atomicity/drop tests preserved.
  • Separate end-to-end generated edgezero serve invocation; shared argument/action selection has unit/source proof, generated build and startup are executed.
  • Real AWS acceptance, intentionally excluded; fixtures do not establish deployed IAM/capacity or the service's 1 MiB evaluation boundary.

An inherited Secrets timeout test transiently returned Unavailable instead of Deadline under the combined parallel run. It passed alone, then all 74 provider tests passed serially. The initial failure log is retained; no production/unrelated test was changed to hide it.

Commands/fingerprints: /tmp/dynamodb-baseline/final-checks.sh, /tmp/dynamodb-baseline/final/, snapshot-{before,after}.sha256; checked source tree 2fa76fb26377cf41203c255f924d988d6b657002. Final read-only provider review found no confirmed defects and is separate from executed checks.

Closes

Closes #410

Checklist

  • Portable store traits and handles unchanged; native AWS dependencies feature/target gated
  • Per-ID KV/config/secret registries; non-Send setup preserved
  • Source-free owned errors, no subscriber suppression
  • Deterministic actual-SDK loopback proof; no real credentials committed
  • Unrelated baseline hunks in eight modified files preserved and excluded from the DynamoDB commits

Fixture lifetime follow-up

Commit e9181716975c068cd6894e046eec1ee3e194ad69 keeps the loopback endpoint alive until its SDK child completes. A local reproduction of the hosted timeout failure identified a genuine ConnectionRefused after the one-response worker dropped its listener while the SDK still owned retries. The deterministic endpoint-lifetime regression fails before this fix. All 79 AWS tests, strict all-feature/all-target AWS Clippy, and 30 repetitions of the original timeout test pass afterward. This changes only the test fixture. Production timeout limits, retry policy and typed error classification are unchanged. Current-head hosted qualification is running; no release tag is claimed.

Owned follow-up review checkpoint

  • Branch advanced through an ordinary merge; every previous public head remains an ancestor.
  • Current head: 4adeb228ebcc0839f5306e16be6ea9b963e97f36. Source tree 224f1f81634a5871a05b569939b13a4f02606b0d is byte-identical to previous head 3733482f6bedcaecb162b1e927209f3800f8b388.
  • Related owned draft: #499. It is intentionally a placeholder until the author cleans feat: implement portable outbound HTTP and request lifecycle contracts #275 and the owned baseline/follow-up are reconciled.
  • Review base and ready/draft state are unchanged. The feature-only review diff is byte-identical to the pre-update diff.
  • Existing qualification remains tied to its recorded inputs. New hosted outcomes are reported separately; this history update does not qualify new source-version-bound binaries or move a release tag.

@ChristianPavilonis ChristianPavilonis self-assigned this Oct 8, 2026
@ChristianPavilonis ChristianPavilonis changed the title issue 410 native store providers Add per-ID native AWS store providers Oct 8, 2026
@ChristianPavilonis ChristianPavilonis changed the title Add per-ID native AWS store providers Add native AWS store providers Oct 14, 2026
@ChristianPavilonis
ChristianPavilonis marked this pull request as ready for review October 19, 2026 18:50
@ChristianPavilonis
ChristianPavilonis requested review from aram356 and prk-Jr and removed request for aram356 October 19, 2026 18:50
@ChristianPavilonis
ChristianPavilonis marked this pull request as draft October 19, 2026 19:10
@ChristianPavilonis
ChristianPavilonis removed this pull request from stack #430 October 22, 2026 15:23
@ChristianPavilonis
ChristianPavilonis changed the base branch from docs/outbound-http-spec to issue-397-diagnostics-proxy-trust-spec October 22, 2026 15:23
@ChristianPavilonis ChristianPavilonis added this to the 202611 milestone Oct 22, 2026
@ChristianPavilonis
ChristianPavilonis force-pushed the issue-410-native-store-providers branch from 5dc18fe to 63892b0 Compare November 10, 2026 19:54

@ChristianPavilonis ChristianPavilonis left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thread replies for the native AWS store review. The PR follow-up comment covers the summary-only points and local verification.

Comment thread scripts/native_aws_test_admin.mjs Fixed
Comment thread docs/guide/dynamodb-kv.md Resolved
@ChristianPavilonis

Copy link
Copy Markdown
Collaborator Author

Review follow-up: f1f18b8a on top of 2b13a665, still based on #409 at c317517c. This does not rewrite the stack or drop any commits.

A few points from the review summaries that don't have their own thread:

  • CHANGELOG.md now has an Unreleased entry. The CLI reference covers structural bindings validation and the typed config push guard. The removed target flags are deliberately not documented as supported.
  • The CLI now shares the feature lookup for Axum build and serve and skips it for deploy. I left the wider Cargo argument, per-kind store dispatch, and selector/ID validation refactors out of this patch. They span caller boundaries and are separate from the checked fixes here.
  • The generated builds stay. They check the scaffold's feature forwarding and prove the default-off refusal and runtime behavior through an actual generated app. A crate-only check would not prove those paths. The independent emulator suite still runs with its existing HTTP fixture; I left parser replacement out of scope.
  • The generated fixtures resolve relative target paths against the generated project, report child stderr on failure, and explain why the build proofs are opt-in. Failure-path tests use held port reservations or stage assertions rather than probing an exited child. The earlier live-address and atomic readiness-marker fixes are unchanged.
  • The DynamoDB guide documents the hot-partition limit; no sharding or change to the agreed DynamoDB scope. The Secrets Manager retained-value cap still applies after SDK response materialization. The CodeQL thread was already resolved; I did not change the alert disposition.
  • The macOS proxy/TLS fixtures that bind 127.0.0.2 were already in feat(axum): add safe diagnostics and trusted proxy metadata #409. A CLI test also raced once with an inherited process-environment fixture on a parallel rerun. Both are outside this PR's AWS fixture fixes.

Local Linux checks passed: 90 AWS provider tests, 429 default and 430 AWS-enabled Axum library tests, six AWS startup tests, 261 CLI tests serially, both generated loopback proofs, the independent pinned-image emulator suite, and all 16 Node admin/runner tests. Scoped all-feature/all-target Clippy, the SDK isolation check, settings-only Wasm, the all-feature Axum demo build, formatting, docs, and workflow lint passed. No macOS rerun or real AWS calls. Hosted checks for this commit are separate from these local results.

@prk-Jr prk-Jr left a comment

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.

PR Review

Summary

Follow-up review at f1f18b8a. Commit f1f18b8a fixes every blocking finding from my earlier review at 3733482f, and I checked each one in the code rather than relying on the thread replies. One new blocker stops this from being approved: the branch no longer merges with its base. issue-397-diagnostics-proxy-trust-spec has moved to 3f6d0da6, and git merge-tree --write-tree reports content conflicts in six files. Because the PR is conflicting, GitHub Actions has not run on this head at all, so none of the new CI steps added here have run in hosted CI.

😃 Praise

  • The fixes come with regressions that would catch a revert. As a mutation check, I narrowed validate_table back to ACTIVE-only, and preparation_describes_and_accepts_supported_active_and_updating_tables failed.
  • The run_app and run_app_with_preflight locator refusal never reads the locator's value. The test checks that the sentinel path does not appear in Debug output.
  • The new strict-only secret alias check (validate_local_secret_namespace) is a good answer to the aliasing question. It keeps today's development behaviour, rejects the ambiguous case where startup is strict, and still allows one local ID next to AWS-bound or supplied IDs.
  • The new CI step uses run_test_nonzero.sh with named sentinels, so a test that is filtered or cfg'd out fails the step instead of passing with zero tests run.

Prior findings status (my review at 3733482f)

  • ✅ run_app ignored EDGEZERO__STORE_BINDINGS_FILE. capture_dev_environment now rejects the locator (dev_server.rs:1089), and the demo and the guide use run_generated_app.
  • ✅ AWS fixtures failed on macOS (WouldBlock). Every non-blocking accept site now restores blocking mode (dynamodb_tests.rs:150, secrets_manager.rs:462, and the shared blocking_accept.rs helpers). Locally on macOS, cargo test -p edgezero-store-aws --all-features --lib passed 3 of 3 runs (90/90 each), and --test native_aws_startup passed 3 of 3 runs.
  • ✅ UPDATING table status was rejected. It is now accepted (dynamodb_kv.rs:672), and the mutation check above confirms the test covers it.
  • ✅ SDK connectors accumulated under tight limits. The connect timeout is now constant (dynamodb_kv.rs:616-620), and connector_timeout_is_stable_while_request_budgets_shrink covers it.
  • ✅ Docs contradicted the code. single_store_kinds, the missing aws-dynamodb, and the draft and process wording are gone. [limits.aws] is documented at native-aws-stores.md:204. The Config and Secret Store sections are back, and the absolute-root requirement is stated.
  • ✅ No CI job ran the axum lib tests with an aws-* feature. The aws-stores,aws-dynamodb --lib step now has sentinels. I ran the exact command locally: exit 0, 429 passed. It has not run in hosted CI, as explained below.
  • ✅ ❓ Local secret IDs shared env variables. Answered and enforced for strict startup and explicit bindings validation (native_bindings.rs:557, native_stores.rs:285).
  • ✅ ❓ Container pulls in the required CLI job. Moved to the separate advisory native-aws-emulator job.
  • ✅ Guide's config push command could not reach the guard. It now uses the typed <your-app>-cli form.
  • ✅ Non-blocking items: the trimmed secret name length (now measured with store_name), the compiled-out AppConfig provider reported as a missing token (token capture is now gated on the feature, and the error names it), the timeout ordering rule and the aws-stores wording (both documented), and the CLI reference flags (added). On fixed trusted bounds for env-selected files, I accept the explanation and the docs; this remains a possible follow-up.

Findings

Blocking

  • 🔧 The branch conflicts with its base, so this head has had no hosted CI. Running git merge-tree --write-tree <base 3f6d0da6> <head f1f18b8a> (merge base c317517c) gives content conflicts in:

    • crates/edgezero-adapter-axum/src/dev_server.rs (10 hunks, including two large runtime/test hunks)
    • run_options.rs
    • service.rs
    • tests/fixtures/production_host.rs (3 hunks)
    • CHANGELOG.md
    • examples/app-demo/Cargo.lock

    They come from the base's later proxy trust, diagnostics, buffered-JSON and production-hosting review fixes (48097ab1, 64447b46, d37a57b8). The resolution is not mechanical. For example, in run_options.rs the env-setting classifier has to keep both this PR's ["store_bindings_file"] => STORE_BINDINGS_FILE arm and the base's native_request_setting fallback (TRUSTED_PROXY_CIDRS, FORWARDING_HEADER_FAMILY, LOGGING__REQUEST_RECORDS). If either is dropped, those settings are misclassified, or the locator is no longer recognised by the runners that now refuse it.

    Because the PR is CONFLICTING, GitHub created no pull_request runs for f1f18b8a: zero check runs on the commit. The last green run is from 2026-11-26, at an earlier head. So the new CI steps (the axum aws-* lib step, the generated native AWS and DynamoDB steps, and the advisory emulator job) have not run on hosted CI.

    Fix: merge or rebase onto the current issue-397-diagnostics-proxy-trust-spec, resolve the conflicts so both sides' settings and startup ordering survive, and let the full workflow run green on the new head. I'll re-review the resolution diff.

Non-blocking

  • 📝 config validate --adapter <x> without --store-bindings now enters bindings-only mode and errors (for --adapter fastly, "supported only for --adapter axum"). This is documented in cli-reference.md and --adapter is new on validate, so nothing breaks. It is noted only in case someone expects --adapter to scope ordinary validation, as it does on other subcommands.

CI Status

  • Hosted (GitHub Actions) at f1f18b8a: no runs. The PR is conflicting with its base, so pull_request workflows were not triggered. Combined status: pending, 0 contexts.
  • Local, macOS, at f1f18b8a, toolchain 1.98.1:
    • cargo fmt --all -- --check: PASS
    • cargo clippy -p edgezero-store-aws -p edgezero-adapter-axum -p edgezero-cli --all-targets --all-features -- -D warnings: PASS
    • cargo test -p edgezero-store-aws --all-features --lib: PASS 3/3 runs (90 passed each)
    • cargo test -p edgezero-adapter-axum --features aws-stores,aws-dynamodb,test-utils --lib: PASS (430 passed)
    • cargo test -p edgezero-adapter-axum --features aws-stores,test-utils --test native_aws_startup: PASS 3/3 runs (6 passed each)
    • cargo test -p edgezero-adapter-axum --lib (default features): PASS (428 passed)
    • cargo test -p edgezero-cli --lib: PASS (261 passed)
    • The new CI sentinel step (run_test_nonzero.sh … --features aws-stores,aws-dynamodb --lib): exit 0
  • Not run:
    • the full workspace suite
    • the WASM checks
    • the ignored generated-build proofs
    • the Docker emulator suite
    • anything against real AWS
  • Not re-read line by line in this pass: the lockfiles and the docs/superpowers plan and spec files. Unchanged production code that I already reviewed at 3733482f was not re-read either; this pass focused on the 3733482f..f1f18b8a delta and the touched production paths.

}
if !matches!(
table.table_status(),
Some(TableStatus::Active | TableStatus::Updating)

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.

😃 Using the typed TableStatus enum here is cleaner than the old string compare, and the regression really guards this line: narrowing it back to Some(TableStatus::Active) makes preparation_describes_and_accepts_supported_active_and_updating_tables fail.

}
}

fn timeout_policy(limits: DynamoDbKvLimits, budget: Duration) -> TimeoutConfig {

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.

😃 Holding the connect timeout constant while the attempt and operation timeouts still shrink with the budget fixes the connector cache growth without loosening any deadline. The comment explains why, which will stop someone "optimising" it back later.

let Some(key) = os_key.to_str() else {
continue;
};
if is_store_bindings_locator_key(key) {

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.

😃 Failing closed here before any store opens, without ever reading the locator's value, is the right shape. 📝 When you resolve the base conflict, keep this check: dev_server.rs has 10 conflict hunks against the current base, and this one sits in the same capture_dev_environment loop the base also changed.

Bring in PR #409's proxy trust and diagnostics review fixes, PR #407's
buffered JSON limit fixes and PR #406's production hosting review fixes
(RunMode with standalone and embedded hosting, typed KV open and config
snapshot failure categories, store normalization in PreparedStores),
with PR #460's and PR #275's fixes below them.

CHANGELOG.md: both sides added an Unreleased section at the top. The
resolution keeps PR #409's "Axum diagnostics and proxy trust" section
first and this PR's "Native AWS stores on Axum" section after it.

crates/edgezero-adapter-axum/src/dev_server.rs: PR #406 replaced the
signals flag with RunMode, initializes the logger only for standalone
production runs, moved config limit parsing out of
build_production_stores, switched to KvOpenFailure and
ConfigStoreError::category, and normalizes bare handles in
From<Stores>. This PR added NativeStoreOverrides, NativeSourcePlan
validation, async build_production_stores, run_generated_app,
run_production_app_with_options_and_initializer and
run_app_with_native_stores. The resolution threads both overrides and
RunMode through run_production_selected. The run_production_* entry
points are standalone, and run_app_with_options* and
run_app_with_native_stores are embedded. NativeSourcePlan validation
runs first, then the standalone-only logger, then PR #406's
"configure: application: assembly failed" error. NativeSourcePlan keeps
carrying the config limits, so store-free apps still reject invalid
limits. The local config and KV sources use PR #406's open call and
failure categories. Local KV keeps the "KV" subject, which PR #406's
production_hosting test pins. From<Stores> keeps PR #406's body. This
PR's dev runner refusal of the bindings locator is kept next to PR
#406's native_request_setting lookup.

This PR's strict-managed, strict-installed and strict-owned logging
probes called the embedded run_app_with_options, but under PR #406 an
embedded run leaves the logger to the host. They now call this PR's
standalone run_production_app_with_options_and_initializer, which owns
the logger. strict-invalid-sources stays on run_app_with_native_stores.
It still proves that source validation runs before any deferred setup,
but on an embedded run it no longer orders validation before logger
setup.

PR #406 also removed the file-level ordering expect. This PR's four new
tests in mod tests move below the fixture types, and native_store_tests
gets a scoped arbitrary_source_item_ordering expect.

crates/edgezero-adapter-axum/src/service.rs: PR #406 removed the
service's bare-handle fields and setters. This PR had moved the same
fallback into resolved_store_registries and legacy_* helpers, and added
a setter-order test for them. The resolution takes PR #406's file. The
registry-precedence check in both setter orders survives in this PR's
dev_server test prepared_stores_preserve_legacy_defaults_and_explicit_registry_precedence.

crates/edgezero-adapter-axum/src/run_options.rs: fixed_setting keeps
this PR's STORE_BINDINGS_FILE arm and PR #409's native_request_setting
fallback.

crates/edgezero-adapter-axum/tests/fixtures/production_host.rs: the
resolution keeps both import sets, this PR's
run_explicit_initializer_fixture, PR #406's legacy_server,
repeated_embedding_logging and embedded_server, and PR #406's main
dispatch. It adds this PR's "explicit-initializer" mode to that
dispatch.

Cargo.lock and examples/app-demo/Cargo.lock: the resolution takes PR
#409's lockfiles and re-resolves them offline, which adds this PR's AWS
SDK graph. cargo update --precise then sets the AWS-only crates back to
this PR's versions: arc-swap, aws-smithy-async,
aws-smithy-runtime-api-macros, aws-smithy-types, ctutils, h2,
tokio-util and uuid in the root, and aws-smithy-types and h2 in
app-demo.
Bring in PR #275's Fastly contract test fix, which expects the terminal
error body in the production key order (serde_json without
preserve_order sorts keys alphabetically). The merge is clean.
aram356 added a commit that referenced this pull request Dec 1, 2026
Bring in PR #439's native Geo sanitization fixes (a supplied provider
behind an untrusted forwarding policy) and the review fixes below it,
from PR #422 down to PR #275, including RunMode hosting,
native_request_setting, the development runner's refusal of the
bindings locator, the ForwardedHost note in the Fastly guide and
DEFAULT_SHUTDOWN_GRACE.

crates/edgezero-adapter-axum/src/run_options.rs: the defaults keep this
PR's optional manifest Geo (geo: None) and the base's
DEFAULT_SHUTDOWN_GRACE. fixed_setting checks this PR's geo_setting
first, then the base's native_limit_setting and native_request_setting.

crates/edgezero-adapter-axum/src/dev_server.rs: the imports keep this
PR's geo_setting and the base's native_request_setting. The base made
shutdown_grace private and no longer uses it here, so its import is
dropped. capture_dev_environment keeps PR #414's refusal of the
bindings locator and the base's native_request_setting lookup, and
adds this PR's geo_setting as the last fallback.

crates/edgezero-adapter-axum/tests/fixtures/production_host.rs:
run_geo_fixture keeps this PR's geo-manifest branch (options from the
environment and the baked manifest). In the explicit branch it adds PR
#439's untrusted X-Forwarded policy for geo-supplied-untrusted.

docs/guide/adapters/fastly.md: the resolution keeps PR #409's
ForwardedHost paragraph at the end of the preceding section and this
PR's new "Geographic context" section after it.
Bring in PR #275's Viceroy repair, which fails an if-generation-match
insert when the key has no live entry, so a stale generation cannot
recreate a deleted key. The merge is clean.
@aram356

aram356 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Round 12 identity realignment: rc/identity (#495) is now at 38cb74fe. This branch fast-forwarded from f1f18b8a to 44a3035a:

#406's RunMode and this PR's native store overrides now run through one startup function, #406's removal of the service handle setters is taken, and the strict-logging probes move to the standalone entrypoint. AWS-only lock entries are pinned back to this PR's versions.

Each merge message says what it carries and how any conflict was resolved.

Bring in PR #275's lockfile update, which moves the yanked
pin-project-lite, chacha20 and yoke-derive versions to their
replacements. The merge is clean.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 15 identity realignment: rc/identity is now at ef5cbf308. This branch fast-forwarded from 44a3035a5 to f0f5af212:

Each merge message says what it carries and how any conflict was resolved.

SDK DEBUG/TRACE records carry DynamoDB request and response bodies, so EDGEZERO__LOGGING__LEVEL=trace must not reach them; applications that own logging keep full control.
Axum accepts multiple secrets IDs; only implicit local IDs, which share one environment namespace, are limited to one.
The proofs set EDGEZERO__DATA_DIR, which the runner never reads, so the directory could never exist. DATA_DIR stays unset; any local KV open already fails strict startup.
Removing consistent_read or moving the prefix into a FilterExpression passed every existing test; DynamoDB Local is always consistent.
… more

The old test ended on a success at the third attempt and ran with AWS_MAX_ATTEMPTS=3, so a higher or missing cap still passed.
# Conflicts:
#	crates/edgezero-cli/src/adapter.rs
aram356 added a commit that referenced this pull request Dec 5, 2026
aram356 added a commit that referenced this pull request Dec 5, 2026
# Conflicts:
#	scripts/ci_tooling.test.mjs
@aram356

aram356 commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Review follow-up: fixes committed to this branch

A full review of this PR turned up the problems below; each would otherwise have needed a follow-up ticket, so it is fixed on this branch instead. Every item names its commit.

  • Managed Axum logging could write DynamoDB keys and values to process logs. At EDGEZERO__LOGGING__LEVEL=trace the managed logger passed AWS SDK tracing events through the log bridge, including PutItem request bodies and GetItem/Query response bodies. 0794f4c builds both managed loggers (development and strict) from one helper that caps aws_config, aws_runtime, aws_sdk*, aws_sigv4 and aws_smithy* at INFO (or the configured level when lower); owns_logging = true keeps full control, and both store guides say SDK DEBUG/TRACE needs it. The managed and strict tests assert debug/trace never print on AWS targets; the owned-logging tests assert they still do.
  • The generated AWS proofs' "must not create local DATA_DIR" assertions could never fail. They set EDGEZERO__DATA_DIR, which nothing reads (only EDGEZERO__ADAPTER__DATA_DIR is a setting). fdb897a removes the variable and the assertions and records that DATA_DIR is deliberately unset; strict startup rejects any local KV binding without it, so the successful runs still prove AWS stores need no local root. The generated DynamoDB proof passes with --ignored; the emulator proof compiles.
  • The adapter overview still listed secrets as an Axum single-store kind (same contradiction as thread, fixed only in axum.md). daef003 makes the cell none and explains the real limit: implicit local secret IDs share EDGEZERO__SECRETS__, so at most one is allowed.
  • The Axum guide said generated apps use run_app. The scaffold calls run_generated_app. a69e1dd says so and when it runs the development runner versus strict production startup.
  • Nothing tested that DynamoDB reads are strongly consistent or that the prefix is a key condition. Removing .consistent_read(true) or moving the prefix into a FilterExpression passed every suite (DynamoDB Local is always consistent). a298dc2 adds a loopback SDK test that asserts ConsistentRead: true on GetItem and Query, the exact KeyConditionExpression with and without a prefix, and no FilterExpression; each regression now fails it.
  • The Secrets Manager retry-cap test passed with a higher cap or no retry config. 61b4abf adds a scenario with three failures expecting Unavailable, run with AWS_MAX_ATTEMPTS=5 so only the explicit client cap can stop at three; with_max_attempts(4) or removing the retry config now fails it.
  • The AppConfig Agent client's loopback trust controls were untested. 8e48166 adds tests that 401/403/404/429/500 map to AccessDenied/Missing/Throttled/Unavailable, that a 302 to a second loopback listener fails Unavailable without contacting it, and that an env-cleared child with HTTP_PROXY/http_proxy/ALL_PROXY pointed at a loopback recorder fetches directly. Deleting .redirect(Policy::none()) or .no_proxy() now fails its test.

Fixes made on the PRs below this one in the stack were merged into this branch with merge commits. One merge carried an adjustment: c5f57b0 adds #[expect(clippy::too_many_lines)] to the Axum startup_logging_child test helper, which the merged #275 test scenarios pushed over the limit, and unions the CLI adapter test imports.

This branch has not been deployed

No deployments
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.

Add native AWS configuration, secret, and ordinary KV store providers

5 participants