Repository navigation
Add native AWS store providers - #414
Draft
ChristianPavilonis wants to merge 17 commits into
Draft
ChristianPavilonis wants to merge 17 commits into
ChristianPavilonis wants to merge 17 commits into
Conversation
* feat: add opt-in reusable application lifecycles Add retained Fastly serving helpers and explicit prebuilt-app dispatch for Cloudflare and Spin while preserving default lifecycles. Preserve repeated Cloudflare response headers. Add Rust lifecycle fixtures, isolation and cancellation coverage, local measurement tooling, CI integration, and adapter documentation with explicit provider validation limits. * fix: import dispatch types for WASM Clippy * test: preserve lifecycle smoke failure diagnostics * Complete custom lifecycle contract and scope config validation Verify lazy initialization, handled failure, recovery and retained reuse in one Fastly guest. Carry request-specific finalization metadata through router dispatch and document the supported custom lifecycle boundary. Scope push and diff adapter validation to the selected destination while preserving standalone portability checks. Redact raw and normalized secret references from Spin diagnostics. Validated with workspace and fixture tests, Clippy, formatting, adapter feature checks, Spin WASM compilation, documentation checks and the local Fastly smoke suite. * Add reusable lifecycle helpers for custom Fastly dispatch Own successful-only lazy state retention, initialization attempts, callback counts, and independent setup in Sandbox<T>. Add reusable and single-request serving wrappers that preserve the SDK sending boundary and application-controlled streaming. Migrate custom lifecycle fixtures to the public helpers and document ownership across adapters. Verified workspace tests, fixture tests, Clippy, adapter compilation checks, formatting, and local Fastly streaming and recovery smoke tests. * Cover Cloudflare response headers and clarify lifecycle contracts Extract the production header-copy logic for host regression tests covering duplicate cookies, default replacement, invalid values, and sink errors. Exercise prebuilt dispatch with fresh request bodies in the Cloudflare browser contract suite. Document store metadata pairing, retained callback captures, and first-snapshot logging limitations without changing existing policies. * Fix Cloudflare contract test import for WASM Clippy * fix: match selected adapter case-insensitively in config validation Adapter lookup is case-insensitive everywhere else (Manifest::adapter_entry, adapter_registry::get_adapter), but the --adapter selection filters in run_adapter_shared_checks, run_adapter_typed_checks, and strict_capability_completeness compared raw strings. So [adapters.Spin] with --adapter spin (or the reverse) passed ensure_adapter_defined but skipped the selected entry's manifest, merged-store, typed-secret, and store-capability checks, letting config push write invalid configuration that fails at runtime. Extract is_unselected_adapter and compare with eq_ignore_ascii_case at all three filters. Add a regression test covering both casing directions. * fix: address reusable app lifecycle review findings * fix: address follow-up lifecycle review findings Docs: - Fastly guide: add a complete serve_custom skeleton, state precise error semantics, use app.router(), avoid echoing setup errors to clients, clarify request vs callback wording, billing and Viceroy caveats. - Correct streaming, cloudflare, overview, spin, axum, handlers, configuration and cli-reference wording; document what --adapter skips. - Trim the fixture README to commands, assertions and limits; move notes into the spec. Drop the removed --require-runtime flag from the plan. - CI: skip the duplicate fastly fixture clippy on the "fastly cli" row. Fixtures: - Custom Fastly dispatch installs its logger via Sandbox::setup_once and joins the logging checks; gate post-send work on the streaming route. - Share MissingBindingApp and the loopback check in fixture-core; map missing bindings to EdgeError::internal without unwraps. - Remove dead max_inflight and configures outputs; route /other through run_app in per-request mode; Spin logger parity and ~6.0 pin. Harness: - Kill live runtime process groups on Ctrl-C (ctrlc crate). - Record Viceroy version mismatch as unverified and keep running. - Single contextual fail record per failure, including startup failures, with a phase field; fail record for mixed build fingerprints. - Serve and fingerprint artifacts copied into the run directory. - Extract settle/cohort_stats helpers; resolve rustc next to $CARGO. * fix: tighten follow-up review fixes after self-review - Custom Fastly fixture: log logger-setup failures to stderr and send a bare 503 instead of echoing the error, matching the guide. - Harness: only skip the generic fail record when a runner already recorded the same error, so an earlier non-fatal failure cannot hide it. - Docs: ServeSummary may be inspected or converted; list EdgeError render failure among terminal errors (guide and serve_app rustdoc); push keeps strict handler-path checks under --adapter; app.router() in rustdoc; qualify the heap-snapshot and setup-once README claims. * docs: polish lifecycle review fixes after re-review - Drop the stale spin.toml copy from the run directory; the served manifest is the rewritten spin-<mode>.toml pointing at staged wasm. - README: note that runtimes serve and fingerprint staged artifact copies. - Plan: exit 2 covers unverified or unsupported evidence. - CLI reference: fix push --adapter sentence grammar.
Preserve the outbound hard-cut contract while integrating opt-in reusable application lifecycles with fallible assembly and adapter-owned delivery. Address R5 with shared future-based batch orchestration and R6 with shared response-body policy. Add deterministic cutoff cleanup and lifecycle evidence, and align fixtures, CI, specifications, plans, guides, and changelog.
Validate finite connection, raw-head, field-count and idle/header limits at startup. Own a bounded connection pool, preserve application deadlines, and compact response headers before parser reuse. Publish audited allocation assumptions and align CLI defaults, demo, scaffold and lifecycle documentation.
Load immutable config snapshots under validated file, entry, payload, registry residency, and staging limits before binding. Migrate all adapters to shared ConfigValue returns and hash canonical JSON incrementally. Add native TCP lifecycle and allocation regressions; align the demo, generator, specs, plans, and changelog while preserving conservative hosted capability claims.
Run each logging probe in a separate temporary working directory so pre-bind KV initialization cannot contend between concurrent subprocesses. Preserve startup ordering and exercise the exact demo CI sentinel.
This was referenced Oct 13, 2026
Share platform-aware prefix matching across environment capture, duplicate validation, and generated startup selection. Add isolated casing and non-Unicode regressions, and document the checked-in generated store proofs.
Run generated application contracts against pinned DynamoDB Local, Moto, and AppConfig Agent services in CI. Add fixture administration and runner tests, document coverage and emulator limitations, and type built-in store sources by binding kind.
18 of 21 tasks
ChristianPavilonis
added this pull request to stack #430
October 19, 2026 18:50
ChristianPavilonis
marked this pull request as ready for review
October 19, 2026 18:50
ChristianPavilonis
requested review from
aram356 and
prk-Jr
and removed request for
aram356
October 19, 2026 18:50
ChristianPavilonis
marked this pull request as draft
October 19, 2026 19:10
This was referenced Oct 19, 2026
ChristianPavilonis
removed this pull request from stack #430
October 22, 2026 15:23
ChristianPavilonis
changed the base branch from
docs/outbound-http-spec
to
issue-397-diagnostics-proxy-trust-spec
October 22, 2026 15:23
ChristianPavilonis
added this pull request to stack #408
October 22, 2026 15:23
4 tasks
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
Sendsetup futures.Design and boundaries
This adds native store providers, not a new HTTP runtime.
edgezero-store-awsimplements 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.tomldeclares logical store IDs and defaults. AWS resource references belong in a separate versioned native bindings document, selected through an absolute file path inEDGEZERO__STORE_BINDINGS_FILEor through explicitAxumRunOptions. Applications can also supply ready handles or non-Senddeferred 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_DIRare required only for remaining local bindings. An unavailable selected provider fails startup; it never falls back to local data.ConfigStorereadsSecretStorereadsKvStoreoperationsflowchart 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]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.
Stack and scope
Existing draft stack member based on
docs/outbound-http-spec/ #275 atea66eff045512cccc60646d6ec339e83ff44fed7, 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
dynamodb-kvprovider / generatedaws-dynamodbfeature; existingaws-storesremains AppConfig Agent + Secrets Manager only.[kv.<id>]binding with explicit region/table/physical namespace, no credential or endpoint fields. Normal operator-owned SDK credential/endpoint policy remains supported.pk/sktable; bounded DescribeTable preflight, exact table-name/schema checking, no provisioning or local fallback. All-remote KV needs noDATA_DIR.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.
aws-storesmembership, Cloudflare/Fastly/Spin WASM checks.Unavailable, one attempt and the retained/removed row. SDK model Debug disclosure is directly asserted.Senddeferred source validation without polling/opening another local store; existing generic native staging atomicity/drop tests preserved.edgezero serveinvocation; shared argument/action selection has unit/source proof, generated build and startup are executed.An inherited Secrets timeout test transiently returned
Unavailableinstead ofDeadlineunder 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 tree2fa76fb26377cf41203c255f924d988d6b657002. Final read-only provider review found no confirmed defects and is separate from executed checks.Closes
Closes #410
Checklist
Sendsetup preserved