feat(compliance): add the deterministic sandbox sanctions provider - #285
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:insufficientin the opaque subjectReference -> InsufficientData; otherwise the provided attribute keys carrying thematchmarker are the matched dimensions, and a PotentialMatch is reported oncematched.size >= requiredMatches, else Clear. The score is a fixed confidence const (not the m-of-n ratio, per the port KDoc).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
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