Skip to content

feat(compliance): add the kyc provider port - #273

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

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

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

Third slice of E-04 Compliance (#263). Unblocks #239 SandboxKycProvider.

What

  • KycProvider port (interface-only, clean-room) in com.fincore.compliance.application.kyc, mirroring BankProvider (F-02.5 BankProvider port + sandbox adapter #212): check(request): KycCheckResult.
  • KycCheckRequest(subjectReference) - an opaque token (never PII), bounded by the KycSession domain invariant (single source of truth, MAX_SUBJECT_REFERENCE_LENGTH).
  • KycCheckResult sealed interface: Approved, Rejected, Pending, InsufficientData(missing) - the typed INSUFFICIENT_DATA outcome (§5.1); reason/missing carry generic codes, never PII.
  • KycProviderException for technical/transient failures (distinct from a business decision).
  • No in-tree implementation (sandbox is F-06.2 SandboxKycProvider #239); no Spring, no persistence.

Gate chain

  • critic: GO-WITH-CHANGES (length bound matching the domain, no-PII KDoc, all 4 variants tested - applied).
  • security-auditor (opus): PASS - clean-room clean, no secrets, PII documented, sound typed contract, 4/4 ACs.
  • code-reviewer: 2 must-fix addressed (de-duplicated the 140 bound by sourcing it from the domain layer; InsufficientData empty-list guard + test).
  • evaluator: PASS (0.92).
    All local gates green (test/detekt/spotless/assemble/jacoco domain).

Closes #263

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

1 participant