Conversation
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.
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.
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.
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.
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Summary
The retained lifecycle and request-isolation paths are well covered, and the exact revision passes the relevant repository and runtime checks. I found one case-sensitive selected-adapter validation edge case, noted inline.
| let env_config = EnvConfig::from_env(); | ||
|
|
||
| for (name, adapter_cfg) in &ctx.manifest().adapters { | ||
| if selected.is_some_and(|target| target != name) { |
There was a problem hiding this comment.
P2: Case differences bypass selected-adapter validation
Adapter lookup is intentionally case-insensitive, but this new filter compares strings exactly. For example, [adapters.Spin] with --adapter spin, or [adapters.spin] with --adapter SPIN, passes ensure_adapter_defined but skips the selected entry. The same comparison at lines 1794 and 1913 then skips typed-secret and strict-capability validation too.
That lets config push proceed without the target adapter's manifest, merged-store, secret-name, or store-capability checks, so invalid Spin configuration can be written and fail later at runtime. Resolve the selected key through Manifest::adapter_entry, or compare with eq_ignore_ascii_case at all three filters, and cover both casing directions in a regression test.
Summary
Set-Cookie.Changes
edgezero-adapter-fastlyedgezero-adapter-cloudflaredispatch_app; replace generated header defaults once and append remaining application values.edgezero-adapter-spindispatch_appwith fresh request setup.edgezero-coreteststests/fixtures/reusable-app, smoke script, CITest plan
The following checks passed during implementation. Local CI gates were not rerun for PR creation; GitHub Actions will validate the submitted branch.
cargo test --workspace --all-targetscargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --checkcargo check --workspace --all-targets --features "fastly cloudflare spin"Validation limits
Checklist
{id}syntaxedgezero_core