feat(compliance): add the kyc provider port - #273
Merged
Conversation
Define a pluggable KycProvider port: a generic, clean-room contract for submitting a KYC check and receiving a typed result (approved, rejected, pending or insufficient-data), with technical failures surfaced as a KycProviderException. The request carries only an opaque subject reference, bounded by the KycSession domain invariant, and result reasons carry generic codes rather than PII. Interface only; the sandbox implementation lands in a later slice. Closes #263
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.
Third slice of E-04 Compliance (#263). Unblocks #239 SandboxKycProvider.
What
KycProviderport (interface-only, clean-room) incom.fincore.compliance.application.kyc, mirroringBankProvider(F-02.5 BankProvider port + sandbox adapter #212):check(request): KycCheckResult.KycCheckRequest(subjectReference)- an opaque token (never PII), bounded by theKycSessiondomain invariant (single source of truth,MAX_SUBJECT_REFERENCE_LENGTH).KycCheckResultsealed interface:Approved,Rejected,Pending,InsufficientData(missing)- the typed INSUFFICIENT_DATA outcome (§5.1);reason/missingcarry generic codes, never PII.KycProviderExceptionfor technical/transient failures (distinct from a business decision).Gate chain
InsufficientDataempty-list guard + test).All local gates green (test/detekt/spotless/assemble/jacoco domain).
Closes #263