Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

ADR-002: Anonymize detected PII before model processing

Detected PII is anonymized through Presidio before feedback is sent to the model or returned, without changing persisted feedback.

November 2, 2026AcceptedSecurity

Context

PII detection alone does not remove sensitive values. The Reviews and Chat pipelines must prevent detected values from reaching a model or appearing in returned text while preserving the ownership and contents of persisted feedback. Output filtering also needs to complete before streamed text is released to a caller.

Decision

Use Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs‘s Anonymize API with the original text and the analysis results to transform text before it reaches a model and before it is returned. Apply the configured anonymization operators to the detected entities; do not assume that detection or anonymization changes the original feedback persisted by the Rating SystemSystemv1.0.0Rating SystemInternal Reviews system that owns customer feedback, publishes rating changes to Catalog, and provides read-time feedbac...Ownercatalog-experience-teamDiagramRepositoryOpen docs or the CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs rating projection.

Do not log raw text, detected PII, or anonymized request/response payloads. If analysis or anonymization fails, propagate the failure rather than bypassing the middleware. Buffer streamed output until privacy processing is complete, so unfiltered chunks are not released.

Consequences

  • The model and caller receive transformed text for entities that were detected and handled by the configured operators; this does not remove undetected sensitive values.
  • Reviews remains responsible for feedback storage. Privacy processing does not rewrite stored feedback or Catalog’s derived rating projection.
  • Fail-closed processing protects against silently sending unfiltered content, but Analyzer or Anonymizer outages can make summarization or chat requests unavailable. Monitor failures without recording sensitive payloads.
  • Buffering streamed output delays delivery until filtering completes and requires the middleware to hold the response temporarily.
  • Anonymization effectiveness depends on detection coverage and operator configuration. Changes to either require validation against both input and output paths.