%%{init: {'theme':'base', 'themeVariables': {
'primaryColor':'#FFB3BA',
'primaryTextColor':'#000',
'primaryBorderColor':'#FF8B94',
'lineColor':'#BAE1FF',
'secondaryColor':'#BAE1FF',
'tertiaryColor':'#FFFFFF'
}}}%%
flowchart LR
A[Analyze Current Code] --> B[Design Change]
B --> C[Implement on Issue Branch]
C --> D[Open PR]
D --> E[Validation and Fixes]
E --> F[Merge to Main]
F --> G[Monitor Workflows]
G --> H[Close Issue and Cleanup]
Problem statement
Capability 43's locked data-residency + log-scrubbing contract:
sub_<sha256[0:12]>. Email addresses replaced withuser_<oid>. Full mappings stored only in the encrypted Cosmos record, accessible only by the deployment-service managed identity.This issue ships the Cosmos region selection, the structured-logging filter that scrubs sub IDs and emails, and the append-only audit blob writer.
Acceptance criteria
/deploy/configure(dropdown defaults to the deployment region).sub_<sha256[0:12]>(deterministic per-sub hash)user_<oid>where the OID is knownsub_hash → sub_id,user_<oid> → email) stored only in the encrypted Cosmos record; access scoped to the deployment-service managed identity.Risks and dependencies
Blocked by: epic 41 #1020; C1 #1027 (multi-region Cosmos); C5 #1031 (OBO/audit hooks); R2 epic #1008; R1 epic #990.
Evidence links
ADR impact
Branch
feature/<this-issue-id>-deploy-metadata-residency-and-log-scrubbingper ADR-018.BPMN process
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#FFB3BA', 'primaryTextColor':'#000', 'primaryBorderColor':'#FF8B94', 'lineColor':'#BAE1FF', 'secondaryColor':'#BAE1FF', 'tertiaryColor':'#FFFFFF' }}}%% flowchart LR A[Analyze Current Code] --> B[Design Change] B --> C[Implement on Issue Branch] C --> D[Open PR] D --> E[Validation and Fixes] E --> F[Merge to Main] F --> G[Monitor Workflows] G --> H[Close Issue and Cleanup]