-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Parent epic
Description
Wire EcContext into the request pipeline following the two-phase model. EcContext::read_from_request() runs pre-routing like GeoInfo; generate_if_needed() runs inside organic handlers only.
Scope: main.rs, publisher.rs, endpoints.rs, registry.rs
Acceptance criteria
EcContext::read_from_request()called before route match on every request, passed existinggeo_info.- EC route handlers (
/identify,/auction,/api/v1/sync,/admin/*) receiveec_contextread-only — never callgenerate_if_needed(), never mutate. - Exception:
/syncreceives&mut ec_context. May assign fallback consent intoec_context.consentwhen query-param fallback applies. handle_publisher_request()andintegration_registry.handle_proxy()callec_context.generate_if_needed(settings, &kv)(best-effort, never 500s).ec_finalize_response()runs on every route: withdrawal (cookie delete + tombstone), last_seen (debounced), mismatch reconciliation, new-EC cookie write.route_request()return type changes toResult<(), Error>; response flushed viasend_to_client().#[fastly::main]entrypoint changes to match. Pre-routing errors handled viato_error_response()+send_to_client().handle_auction()signature changes to accept&KvIdentityGraphand&EcContext.- Handler refactoring: internal
build_consent_context()calls replaced withec_context.consent. Identity fromec_context.ec_value. cargo test --workspacepasses with no regressions.
Spec ref
docs/internal/ssc_technical_spec.md §5, §17
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels