Skip to content

feat(compliance): add the sanctions provider port - #274

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

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

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

Fourth slice of E-04 Compliance (#264). Unblocks #240 SandboxSanctionsProvider.

What

  • SanctionsProvider port (interface-only, clean-room) in com.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 opaque subjectReference. The m threshold is caller-configurable (not a hardcoded business value).
  • SanctionsScreeningResult sealed: 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.
  • SanctionsProviderException for technical/transient failures.
  • No in-tree implementation (sandbox is F-06.3 SandboxSanctionsProvider #240); no Spring, no persistence.

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

  • critic: GO-WITH-CHANGES (neutral keys, out-of-tree resolution KDoc, score-semantics KDoc, keep InsufficientData + domain const reuse - applied).
  • security-auditor (opus): PASS - clean-room clean, zero PII surface, caller-configurable threshold, 4/4 ACs.
  • code-reviewer: APPROVED (2 optional coverage adds applied: NaN-score + exception-throw-path tests).
  • evaluator: PASS (0.91).
    All local gates green (test/detekt/spotless/assemble); 13 contract tests.

Closes #264

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
@tiana-code tiana-code added this to the v0.3.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit 05ce120 into main Jun 19, 2026
8 checks passed
@tiana-code
tiana-code deleted the feat/E-04-sanctions-provider-port branch June 19, 2026 08:54
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-04.4 SanctionsProvider port (clean-room interface)

1 participant