Skip to content

Complete removal of the legacy consent KV path#903

Draft
ChristianPavilonis wants to merge 1 commit into
perf/group-batch-sync-by-ec-idfrom
refactor/remove-legacy-consent-store
Draft

Complete removal of the legacy consent KV path#903
ChristianPavilonis wants to merge 1 commit into
perf/group-batch-sync-by-ec-idfrom
refactor/remove-legacy-consent-store

Conversation

@ChristianPavilonis

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the inactive legacy consent KV fallback/write path, storage module, source metadata, and Fastly route dependency.
  • Keep live consent request-local and preserve ec.ec_store as the sole KV-backed EC identity/withdrawal store.
  • Fail fast when stale TOML or JSON/app-config still contains consent_store, with explicit operator migration guidance.

This PR is stacked on #902.

Changes

Area Change
Consent core Remove KV fields/branches from ConsentPipelineInput, delete the dead storage module, and remove ConsentSource::KvStore
Configuration Remove ConsentConfig::consent_store and add strict TOML/runtime-JSON rejection tests
Fastly Stop opening an unused consent store for auction, page-bids, and publisher routes; remove the local fixture and named opener
Other adapters Correct generic platform-KV comments that still advertised consent persistence
Documentation Explain request-local consent authority, strict upgrade failure, binding cleanup, rollback retention, and why legacy records are not migrated into ec.ec_store

Migration note

Deployments that still configure [consent].consent_store must remove the field before upgrading. Strict config loading intentionally rejects it. The old store may be retained unchanged for a rollback window, then unlinked and deleted; its records must not be copied into ec.ec_store.

Closes

Closes #883

Test plan

  • cargo test-fastly && cargo test-axum
  • cargo clippy-fastly && cargo clippy-axum
  • cargo fmt --all -- --check
  • JS tests: cd crates/trusted-server-js/lib && npx vitest run
  • JS format: cd crates/trusted-server-js/lib && npm run format
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve — not run
  • Other: strict TOML/JSON migration tests, consent and Fastly dispatch tests, cargo test-cloudflare, cargo test-spin, parity, ./scripts/test-cli.sh, all Cloudflare/Spin clippy targets, and all-features core rustdoc

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses log macros (not println!)
  • New code has tests
  • No secrets or credentials committed

@ChristianPavilonis ChristianPavilonis self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant