Repository navigation
Portable DynamoDB and celld record providers on Fastly - #522
Draft
ChristianPavilonis wants to merge 12 commits into
Draft
ChristianPavilonis wants to merge 12 commits into
ChristianPavilonis wants to merge 12 commits into
Conversation
Move row encoding, cursors, validation and the mutation classifier into a transport-independent record core. The native SDK transport keeps the same requests and deadlines. The portable transport sends DynamoDB JSON 1.0 over EdgeZero outbound HTTP, signed with aws-sigv4 from per-request credentials. Add the aws-dynamodb-records binding settings with an optional endpoint, pinned table identity and logical credentials reference, plus native preflight and pinned preparation for the offline pin command.
Move request headers and response validation into a transport-neutral wire module used by the native reqwest client and a portable HttpClient exchanger. The record store is generic over the exchanger. Portable bindings require authenticated HTTPS and a pinned store instance, and read their bearer token from a logical secrets store once per request. Add celld-records binding settings, native preflight and pinned preparation.
Move the strict document and provider dispatch into a settings-only edgezero-adapter store_bindings module. Axum keeps its file input and native source selection, rejects portable credential references and the DynamoDB endpoint, and verifies pinned identities during native preparation. Add an offline portable validator for targets such as Fastly, plus native pinned-preparation, preflight and portable celld exchanger tests.
Extend the native store dependency contract to the portable provider features on all three WASM targets, including where aws-sigv4 may appear. Add compile-only CI checks for both portable features and a verified download of the pinned official celld 0.6.3 release for CI.
The offline pin command and the runtime providers share one derivation.
Fastly reads the optional edgezero_store_bindings Config Store document once when the app is built, validates it offline and keeps prepared providers on the retained App. Each bound KV ID is served by its portable provider over the request's effective HttpClient; unbound IDs stay on Fastly KV. A bad document or a provider missing from the binary fails assembly without fallback. Add the aws-dynamodb-records and celld-records adapter features, forward [adapters.fastly.build] features to generated Fastly builds, and add 'edgezero config bindings pin' plus offline Fastly bindings validation.
…ceroy Add a portable fixture app that serves both KV IDs through the adapter's registry, and a portable-record-contract harness suite with strict per-provider receipts for the shared contract, independent Add/CAS races, 1001-key pages, native-to-portable reads and cleanup. Cleanup now drains every global page.
Add real-service native and portable interop tests and an orchestrator that provisions DynamoDB Local and official celld behind TLS, pins the bindings, seeds native rows and runs the Viceroy suite. Check the Fastly provider dependency graphs and add the required portable record contracts job.
The shared record contract asserts the exact global listing, so the natively written interop row must be consumed first.
| ] { | ||
| fs::write(&bindings, input).unwrap(); | ||
| let error = run_config_validate(&args).unwrap_err(); | ||
| assert!(error.contains(expected), "{error}"); |
2 tasks
aram356
marked this pull request as draft
November 20, 2026 17:12
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
edgezero config bindings pin. Credentials come from a logical Secret Store with derived key names, read once per request.feat/portable-client-info,10ed3803). Design:docs/superpowers/specs/2026-11-19-portable-record-providers-design.md; plan and evidence:docs/superpowers/plans/2026-11-19-portable-record-providers.md.Changes
edgezero-store-awsdynamodb-records-portable: JSON 1.0 overHttpClient, signed withaws-sigv4, credentials fromKV__<ID>__AWS_*.aws-dynamodb-recordssettings gain optionalendpoint,pinnedandcredentials; native pinned preparation and preflight. Settings clocks useweb_time.edgezero-store-celldwiremodule used by the native reqwest client and a portableHttpClientexchanger. Newportable-records: authenticated HTTPS only, pinned instance, token fromKV__<ID>__CELLD_TOKEN.getrandom/wasm_jsonly onwasm32-unknown-unknown.edgezero-adapterstore-bindingsfeature: the shared strictversion = 1document and an offline portable validator.edgezero-adapter-axumcredentials,token_secretand the DynamoDBendpoint; verifiespinnedat startup. Real-service interop tests (tests/portable_interop.rs, ignored by default).edgezero-adapter-fastlyaws-dynamodb-records,celld-records. Readsedgezero_store_bindings/EDGEZERO__STORE_BINDINGSwhen the app is built, keeps prepared providers on the App, binds them per request over the effectiveHttpClient. Unbound IDs stay on Fastly KV; bad documents or uncompiled providers fail assembly, no fallback. Generated crate andfastly.tomltemplates forward build features.edgezero-cliconfig bindings pin --adapter fastly --store-bindings <file>(featurebindings-pin, default on; writes onlypinned, atomically).config validate --adapter fastly --store-bindingsoffline checks. Manifest build features reach provider-CLI builds viaEDGEZERO_BUILD_FEATURES. Generated CLI template mirrors the command.edgezero-test-harnessportable-record-contractsuite with strict per-provider receipts; portable fixture app on the canonical Fastly path; record cleanup drains every page; reviewed ownership fingerprints updated for the new selector and dispatch.scripts/run_portable_record_contract.mjsorchestrator (DynamoDB Local, official celld behind TLS, pin, native seed, Viceroy, interop),fetch_official_celld.mjs, dependency contract extended to portable and Fastly graphs..github/workflows/test.ymldocs/guide/*Closes
Closes #474
Unblocks #479 and #484, whose runtime wiring is out of scope here.
Test plan
cargo test --workspace --all-targets(RUST_TEST_THREADS=1)cargo clippy --workspace --all-targets --all-features -- -D warnings, plus Fastlycli/no-default, harness and fixture Clippycargo fmt --all -- --check(root, harness, fixtures)cargo check --workspace --all-targets --features "fastly cloudflare spin"wasm32-wasip1,wasm32-unknown-unknown,wasm32-wasip2; Fastly adapter with both provider features onwasm32-wasip1; Spin checkexamples/app-demoworkspace:cargo test --workspace --all-targetsnpm run lint && npm run format && npm run buildedgezero serve --adapter axumscripts/check_native_store_dependency_contract.shand Node tests pass.Known, not caused here:
record-contractsuite still fails in Viceroy 0.21.0 (both racing writers succeed), as recorded in the earlier record plan. The portable suite is separate so it neither fails nor hides that result.--no-default-features --features cli,edgezero-adapter-axumshows 73 failures, identical on the base commit. CI runs only thebindingssubset there (14 pass).Open before merge:
us-east-1(P11). Needs a scratch Fastly service; docs mark it pending, no numbers recorded.HttpClient(Viceroy cannot change secrets mid-run). Store-level tests cover the same logic.Notes for review:
sh -cexpansion); the repo pins 16.0.0.Checklist
syncviaaws-smithy, allowed by the existing feature-aware check){id}syntax (not:id)edgezero_core(nothttpcrate)KvRegistry/ConfigRegistry/SecretRegistry(not the legacy single-handle setters) — see spec §6.6