feat(compliance): add the sanctions provider port - #274
Merged
Conversation
Define a pluggable SanctionsProvider port: a generic, clean-room contract for screening a subject with a configurable m-of-n partial match. The request carries an opaque subject reference and a set of generic attribute keys (no values, no PII); the result is a typed clear, potential-match (matched keys plus a bounded confidence score) or insufficient-data outcome, with technical failures surfaced as a SanctionsProviderException. Interface only; the sandbox implementation lands in a later slice. Closes #264
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.
Fourth slice of E-04 Compliance (#264). Unblocks #240 SandboxSanctionsProvider.
What
SanctionsProviderport (interface-only, clean-room) incom.fincore.compliance.application.sanctions, mirroring KycProvider (F-04.3 KycProvider port (clean-room interface) #263):screen(request): SanctionsScreeningResult.SanctionsScreeningRequest(subjectReference, attributes: Set<String>, requiredMatches)- a generic m-of-n partial-match contract: screen N attribute-key dimensions, flag a potential hit when at least m match. The request carries keys only, no values (zero PII surface); the provider resolves subject data out of tree by the opaquesubjectReference. The m threshold is caller-configurable (not a hardcoded business value).SanctionsScreeningResultsealed:Clear,PotentialMatch(matchedAttributes, score)(bounded confidence in [0,1] via named consts),InsufficientData(missing)(§5.1 typed contract). Matched/missing keys are generic, never PII.SanctionsProviderExceptionfor technical/transient failures.Clean-room (§5.3.1)
No real sanctions lists, PEP data, provider names, entry formats, or business thresholds. The epic's highest §5.3 risk - audited clean.
Gate chain
All local gates green (test/detekt/spotless/assemble); 13 contract tests.
Closes #264