Skip to content

Add native AWS store providers - #414

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

ChristianPavilonis wants to merge 31 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
The startup failure tests in native_aws_startup.rs reserve a loopback
port by binding and dropping a listener, pass it to the host, wait for
the host to exit and then assert that nothing answers on that port.
Once the host has exited the check can only reach another test's
fixture that was given the released port, and with the accepted streams
blocking again it did so in 2 of 25 macOS runs ("startup failure must
happen before listener acceptance").

Hosts that must fail now start through ChildHost::spawn_failing, which
keeps the reservation bound, but not listening, until the host is
dropped, so nothing can answer the check. assert_no_listener also
asserts that the host never reported a failed bind on the held port.
This follows the reservation change PR #519 makes in
production_hosting.rs (09b09d9, prk-Jr). The successful startup test
keeps releasing its reservation so the host can bind it.
aram356 added a commit that referenced this pull request Nov 25, 2026
Take PR #524's updated tip, which carries main's Fastly SDK 0.13.3
upgrade (#529) with Viceroy 0.22.0 and the Fastly CLI 17.2.0 upgrade
(#531), PR #275's drain of declared uploads before an early-response
HTTP/1 close, and the macOS test fixes from PRs #407 and #414. It
merges without conflicts.
aram356 added a commit that referenced this pull request Nov 25, 2026
Take PR #515's updated tip, which carries main's Fastly SDK 0.13.3
upgrade (#529) with Viceroy 0.22.0 and the Fastly CLI 17.2.0 upgrade
(#531), PR #275's drain of declared uploads before an early-response
HTTP/1 close, and the macOS test fixes from PRs #407 and #414. It
merges without conflicts.
aram356 added a commit that referenced this pull request Nov 25, 2026
Take PR #519's updated tip, which carries main's Fastly SDK 0.13.3
upgrade (#529) with Viceroy 0.22.0 and the Fastly CLI 17.2.0 upgrade
(#531), PR #275's drain of declared uploads before an early-response
HTTP/1 close, and the macOS test fixes from PRs #407 and #414. It
merges without conflicts.
aram356 added a commit that referenced this pull request Nov 25, 2026
Take PR #502's updated tip, which carries main's Fastly SDK 0.13.3
upgrade (#529) with Viceroy 0.22.0 and the Fastly CLI 17.2.0 upgrade
(#531), PR #275's drain of declared uploads before an early-response
HTTP/1 close, and the macOS test fixes from PRs #407 and #414. It
merges without conflicts.
Bring in PR #275's installation of the wasm32-unknown-unknown target
before the Viceroy 0.22.0 readiness repair builds, which the fastly
wasm tests and Portable record contracts (Fastly) jobs need.
@aram356

aram356 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#495), I pushed ba5d3f1c, 3231baf8, 494845ab and 15bae175.

  • ba5d3f1c merges feat(axum): add safe diagnostics and trusted proxy metadata #409's new head. It takes EdgeZero main's Fastly SDK 0.13.3 upgrade (Upgrade Fastly SDK to 0.13.3 #529), with Viceroy 0.22.0 and the Fastly CLI 17.2.0 upgrade (Upgrade Fastly CLI to 17.2.0 #531), with feat: implement portable outbound HTTP and request lifecycle contracts #275's exact pins at 0.13.3 and url 2.5.9, its Viceroy readiness repair on 0.22.0, its typed Image Optimizer unavailability check and its drain of declared uploads after an early response on Axum. Cargo.lock conflicted and is merged by package entry: this PR's second http version makes the fastly, fastly-shared and fastly-sys 0.13.3 entries name http 1.4.2, and the 0.13.1 entries this PR had edited are pruned. The result equals a targeted cargo update -p fastly --precise 0.13.3 of this PR's lock.
  • 3231baf8 restores blocking mode on streams the native_aws_startup and dynamodb_generated_proof fixtures accept. They poll a non-blocking std TcpListener and read each accepted stream with set_read_timeout; macOS accept(2) copies O_NONBLOCK to the accepted socket (Linux does not), so those reads could fail at once with WouldBlock and the tests failed at random on macOS under load. The commit carries those two sites from Fix macOS-only test fixture failures #519's 45012206 byte for byte: the accept_blocking helpers in crates/edgezero-adapter-axum/tests/fixtures/blocking_accept.rs and crates/edgezero-cli/tests/support/blocking_accept.rs, and the same call at each site, so Fix macOS-only test fixture failures #519's merge of this branch sees identical changes.
  • 494845ab holds the port reservation of a native AWS host that must fail to start. The startup failure tests released the reserved port before asserting that nothing answers on it, so the check could reach another test's fixture given that port, which happened in 2 of 25 macOS runs. Hosts that must fail now start through ChildHost::spawn_failing, which keeps the reservation bound but not listening until the host is dropped, and assert_no_listener also asserts that the host never reported a failed bind on the held port. This follows Fix macOS-only test fixture failures #519's reservation change in production_hosting.rs (09b09d9e). The successful startup test still releases its reservation.
  • 15bae175 merges feat(axum): add safe diagnostics and trusted proxy metadata #409's next head, which brings feat: implement portable outbound HTTP and request lifecycle contracts #275's d8cd85c8: it installs the wasm32-unknown-unknown target before the Viceroy 0.22.0 readiness repair builds, as the fastly wasm tests and Portable record contracts (Fastly) jobs need. It had no conflicts.

@aram356 aram356 mentioned this pull request Nov 25, 2026
14 of 15 tasks
Bring in PR #275's atomic conditional KV insert in the Viceroy readiness
repair, and the production hosting tests' held port reservations and
spawn-token respawn from PR #406 up, with each later PR's tests reading
the live host's address.
explicit_production_initializer_uses_owned_options_and_prepared_stores
read /state from the address it reserved before spawning. CI saw another
test's server answer there; after a respawn the live host's address is
server.addr().
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#495), I pushed 721a99d8 and 25a28501. 721a99d8 merges #409's new head, which brings #275's atomic conditional KV insert in the Viceroy readiness repair and the production hosting tests' held port reservations and spawn-token respawn; it had no conflicts. 25a28501 makes explicit_production_initializer_uses_owned_options_and_prepared_stores read /state from server.addr(), the live host's address, instead of the address it reserved before spawning; CI saw another test's server answer there.

Bring in PR #275's batch cutoff test fix, which advances the test clock
when the request arms its own deadline instead of after dispatch.
The generated initializer wrote PROOF_ENTERED with std::fs::write, which
creates the file before writing the resolved secret. App::ready reads
the marker as soon as the path exists, so it could read it empty and fail
"nested secret must resolve before readiness marker" (left "", right
"secret-A"), as CI saw on PR #514. The secret had already resolved; only
the marker was observed half written.

The initializer now writes a staged file beside the marker and renames
it into place, so the marker appears with its content.
aram356 added a commit that referenced this pull request Nov 26, 2026
Take PR #502's updated tip, which carries PR #275's batch cutoff test
fix and PR #414's AWS emulator proof marker published by rename. It
merges without conflicts.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#495), I pushed be439ec8 and 2b13a665. be439ec8 merges #409's new head, which brings #275's 0e2a58ae, the fix for an intermittent failure of the batch cutoff test; it had no conflicts. 2b13a665 publishes the AWS emulator proof's readiness marker by rename. The generated initializer wrote PROOF_ENTERED with std::fs::write, which creates the file before writing the resolved secret, and App::ready reads the marker as soon as the path exists, so it could read it empty and fail "nested secret must resolve before readiness marker", as CI saw on #514. The initializer now writes a staged file beside the marker and renames it into place, so the marker appears with its content.

@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.

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