# Phase 11 Sprint B: Data Governance Checklist (P11-SB-F01)

Date: 2026-03-27
Owner: Compliance Team + Data Platform Team
Status: **Approved — all items complete**

---

## 1. Entity Registry

| Entity | App | ADR-0009 Tier | PII Classification | Retention |
|---|---|---|---|---|
| `IbanRoutingRecord` | wallet_integrations | C/A | :financial | 7 years |
| `InboundCredit` | wallet_integrations | C/A | :financial | 7 years |
| `AfexProfile` | wallet_integrations | B | :personal | 7 years |
| `AfexProfileSyncRecord` | wallet_integrations | C | :operational | 5 years |
| `VirtualIban` | wallet_accounts | A | :financial | 7 years |

Reference: `WalletIntegrations.DataGovernance` module.

---

## 2. PII Field Tagging

### IbanRoutingRecord
- `:destination_iban` — Virtual IBAN; financial identifier
- `:resolved_account_id` — Links to user wallet account
- `:provider_reference` — External payment reference

### InboundCredit
- `:destination_iban` — Financial identifier
- `:sender_name` — Personal name (optional)
- `:provider_reference` — External payment reference

### AfexProfile
- `:afex_customer_id` — AFEX identity linkage
- `:full_name` — Personal name
- `:email` — Email address
- `:phone` — Phone number
- `:country_code` — Nationality/residence indicator

### AfexProfileSyncRecord
- `:afex_customer_id` — AFEX identity linkage
- `:wallet_account_id` — Internal account linkage

### VirtualIban (wallet_database)
- Migration includes `pii_classification` (default: "financial") and
  `pii_retention_years` (default: 7) columns.

---

## 3. Retention Enforcement

| Store | Purge Function | Scope | Status |
|---|---|---|---|
| `IbanRoutingStore` | `purge_before_date/1` | Terminal records only (routed/failed/duplicate) | ✓ Implemented |
| `AfexProfileSyncStore` | `purge_before_date/1` | Terminal records only (applied/failed/skipped) | ✓ Implemented |
| `VirtualIbanStore` | (DB-backed purge via migration) | Deactivated records past retention | Scheduled for Phase 12 |

Pending records are **excluded** from purge to prevent orphaning live transactions.

---

## 4. Compliance Controls Registered

| Control ID | Domain | Description |
|---|---|---|
| CTRL-VIB-001 | virtual_iban | Virtual IBAN lifecycle transitions must emit AuditEvent |
| CTRL-IBR-001 | inbound_routing | Every inbound credit must reach terminal routing state |
| CTRL-PSY-001 | afex_sync | AFEX profile sync PII subject to 7-year retention |
| CTRL-RET-001 | retention | Phase 11 entities purged per retention schedule |

Reference: `WalletCompliance.ControlCatalog`.

---

## 5. Access Control

| Entity | Read Access | Write Access |
|---|---|---|
| VirtualIban | wallet_accounts (internal) | wallet_accounts commands only |
| IbanRoutingRecord | wallet_integrations router | wallet_integrations (via GenServer) |
| AfexProfile | wallet_integrations sync command | wallet_integrations (via GenServer) |
| AfexProfileSyncRecord | wallet_integrations audit | wallet_integrations (via GenServer) |

Cross-app access uses dependency injection (account_resolver / ledger_poster patterns).
No direct store-to-store coupling across app boundaries.

---

## 6. Audit Trail

All Phase 11 commands emit `WalletObservability.AuditEvent`:
- `provision_virtual_iban` / `assign_virtual_iban` / `release_virtual_iban` / `deactivate_virtual_iban`
- `process_cash_in`
- `ingest_afex_profile_sync`
- `route_inbound_credit`

---

## 7. Approval Note

Sprint B data governance controls reviewed and approved per:
- ADR-0009 data partitioning and retention baseline
- ADR-0011 compliance and data governance controls
- wallet-pin-policy.md (PIN data, Phase 11-SA-D01)
- virtual-iban-policy.md (Virtual IBAN, Phase 11-SB-C01)

All P0 Sprint B must-complete tasks satisfied. P11-SB-B02 (reconciliation job) carried
over as P1 per Sprint B tolerance policy.

Approved: Platform Team + Compliance Team — 2026-03-27
