Skip to content

feat(compliance): add the deterministic sandbox sanctions provider - #285

Merged
tiana-code merged 1 commit into
mainfrom
feat/E-04-sandbox-sanctions-provider
Jun 19, 2026
Merged

feat(compliance): add the deterministic sandbox sanctions provider#285
tiana-code merged 1 commit into
mainfrom
feat/E-04-sandbox-sanctions-provider

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

E-04 / E-06 #240 - an in-tree sandbox impl of the SanctionsProvider port (unblocked now that port #264 exists). Mirrors the merged #239 SandboxKycProvider.

What

  • infrastructure/sanctions/SandboxSanctionsProvider - @Component @ConditionalOnProperty(prefix="fincore.compliance.sanctions.sandbox", name=[enabled], havingValue=true, matchIfMissing=false), off by default. Deterministic, marker-based, exercising the port's m-of-n contract: insufficient in the opaque subjectReference -> InsufficientData; otherwise the provided attribute keys carrying the match marker are the matched dimensions, and a PotentialMatch is reported once matched.size >= requiredMatches, else Clear. The score is a fixed confidence const (not the m-of-n ratio, per the port KDoc).
  • Unit test: Clear / PotentialMatch / below-threshold-Clear / InsufficientData / determinism.

Bean-conflict (verified clean)

Nothing injects SanctionsProvider (only the port files + its contract test). Off-by-default => no bean unless enabled, and no context requires it => neither a NoUniqueBeanDefinitionException nor a missing-bean failure. The ITs are untouched.

Gate chain

  • critic: GO (bean-conflict verified airtight; m-of-n + invariants sound).
  • security-auditor (opus): PASS - §5.3 clean (generic markers, no real lists/names/PEP/PII; output echoes only caller attribute keys), off-by-default safe, score is a generic confidence const, 4/4 ACs.
  • code-reviewer: APPROVED, no must-fix.
  • evaluator: PASS (0.88).
    All local gates green (unit test; infrastructure/sanctions so the domain jacoco gate is unaffected).

With this, only #277 (KYC idempotency) remains before epic E-04 #162 can close.

Closes #240

Provide an in-tree sandbox implementation of the SanctionsProvider port
for local and test use. It is off by default and only activates when
fincore.compliance.sanctions.sandbox.enabled is true, mirroring the
sandbox kyc and bank providers. The outcome is a pure function of
documented case-insensitive markers: an insufficient marker in the
opaque subject reference yields InsufficientData, otherwise the provided
attribute keys carrying the match marker are the matched dimensions and
a potential hit is reported once at least the requested number of them
match. The score is a fixed sandbox confidence, not the m-of-n ratio. It
encodes no real sanctions list, names, or PEP data.

Closes #240
@tiana-code tiana-code added this to the v0.3.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit c9f9da6 into main Jun 19, 2026
8 checks passed
@tiana-code
tiana-code deleted the feat/E-04-sandbox-sanctions-provider branch June 19, 2026 13:33
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.

F-06.3 SandboxSanctionsProvider

1 participant