Centralize EC middleware finalize lifecycle#554
Draft
ChristianPavilonis wants to merge 3 commits intofeature/partner-registrationfrom
Draft
Centralize EC middleware finalize lifecycle#554ChristianPavilonis wants to merge 3 commits intofeature/partner-registrationfrom
ChristianPavilonis wants to merge 3 commits intofeature/partner-registrationfrom
Conversation
Moves EC context parsing to router prelude and applies cookie/KV finalize behavior in one place so organic and non-organic routes follow consistent Story 5 lifecycle rules.
Delete consent KV entries during withdrawal finalize and add branch-focused finalize tests so centralized middleware lifecycle behavior is less regression-prone.
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
/auctionread-only for EC generation while preserving consent-gated identity forwarding and documenting that behavior explicitly.Changes
crates/trusted-server-core/src/ec/finalize.rscrates/trusted-server-core/src/ec/mod.rsEcContextwith pre-read geo support, shared generation API with optional KV write-through, and helper accessors for finalize logic.crates/trusted-server-adapter-fastly/src/main.rsEcContext/geo/KV in router, pass context through handlers, and applyec_finalize_responsebefore common response finalization.crates/trusted-server-core/src/publisher.rscrates/trusted-server-core/src/integrations/registry.rscrates/trusted-server-core/src/auction/endpoints.rsdocs/guide/configuration.mdCloses
Closes #538
Test plan
cargo test --workspacecargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --checkcd crates/js/lib && npx vitest runcd crates/js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serveChecklist
unwrap()in production code — useexpect("should ...")tracingmacros (notprintln!)