Claims settlement, reserving & GL β four-eyes controls + double-entry (CLM-FIN)
:::note Status
β
LIVE on dev AND prod, proven end-to-end with a real reserve (2026-11-22). The claim money controls +
general-ledger posting. The four-eyes workflow (reserve approve Β· payment requestβapproveβexecute Β·
large-loss review) lives in ktayl-claims (which owns the claim over the frozen GlobalCore legacy); the
GL posting lives in a new ktayl-core claimsgl module, consuming a published
insurance.claims.financial event one-way. Not the ADR-014 fold. Detailed design + the full case study
live in the repos (ADR-021 + ktayl-core/docs/evidence/); this page is the org-site map.
:::
Why it's split this way (ADR-021)β
ktayl-claims is a Strangler/ACL over the frozen Oracle GlobalCore legacy β it owns the claim and its
reserve/settle state machine. ktayl-core is the modular monolith that already runs the ERPNext GL for
premiums (BILL-014). So the claim money workflow stays with the claim (keeping it whole β no split-brain,
no premature fold), and ktayl-core gets only the GL seam it's best at, fed by an async event. The
alternative (a full claims-finance module in core) would split a claim's money from its state across two
services β rejected.
Architecture (the claim money thread)β
ktayl-claims (ACL over the frozen Oracle legacy) ktayl-core (claimsgl module)
reserve / settle ββββββββββββββΊ GlobalCore (Oracle, SOAP)
β above authority / large-loss β FOUR-EYES β² insurance.claims.financial
βΌ (approve β requester; payment: requestβapproveβexecute)β (CLAIMS_EVENTS, durable consumer)
applied to the legacy β
β β
βΌ Debezium CDC β claim_read projection β
projector computes the MOVEMENT (new β prior) β
βββ transactional outbox β publisher βββββββββββββββββββββ
outbox β ERPNext Journal Entry (double-entry)
| Decision | Choice | Ref |
|---|---|---|
| Ownership split | workflow in ktayl-claims Β· GL-only seam in ktayl-core, one-way async event | ADR-021 |
| Emission | CDC-driven (the projector computes the reserve/settlement movement) β not the command path | ADR-021 |
| GL | adopt ERPNext β balanced Journal Entries (never rebuild a ledger) | BILL-014 pattern |
| Controls | four-eyes (approver β requester) + SoD on payments (request β approve β execute) + large-loss review | ADR-021 |
As-built β the CLM-FIN epicβ
| Slice | What's live |
|---|---|
| CLM-FIN-01 GL seam | claimsgl CLOSED module (ktayl-core): durable JetStream consumer of insurance.claims.financial β transactional outbox β ERPNext JE. Mapping (French PCG): reserveβ β DR 6561 Charges de sinistres / CR 4675 Sinistres Γ payer; downward adj β the reverse; payment β DR 4675 / CR 5121 Cash. Balance enforced at construction. |
| CLM-FIN-02 emitter | ktayl-claims emits insurance.claims.financial when a reserve/settlement moves β the CDC projector computes new β prior and writes it to a transactional outbox (atomic with the claim_read upsert) β a scheduled publisher drains it to the CLAIMS_EVENTS stream. Deterministic event_id β end-to-end idempotency. Prod-only producer (dev stays off β one producer, no devβprod-GL leak). |
| CLM-FIN-03a reserve four-eyes | Above-authority or large-loss reserve β 202 PENDING (held in a claims-side store, legacy untouched) β a different, higher-authority person approves β applied to the legacy. Self-approve 403, already-decided 409. Below authority β applied directly. |
| CLM-FIN-03b payment workflow | A settlement above authority / large-loss β request β approve (four-eyes) β execute (a non-requester executor); only execute disburses (legacy.settle) β approval alone never pays (segregation of duties). |
| CLM-FIN-04 deploy + live proof | CLAIMS_EVENTS stream (gitops), ktayl-core prod consumer active, ktayl-claims prod producer promoted (Kargo). Proven: a real reserve β GL JE. |
Operate / verifyβ
# the claims GL consumer is bound (prod):
ssh controller "kubectl exec -n messaging deploy/nats-box -- nats consumer ls CLAIMS_EVENTS" # β claimsgl-ingest
# end-to-end (a real reserve on the prod claims API β a balanced claims JE in ERPNext):
# POST https://claims-prod.10.0.0.200.nip.io/api/claims/<CLM>/reserve (X-Claims-Authority: SENIOR) {"amount":30000}
# β 200 RESERVED β Debezium CDC β emitter β claimsgl β ERPNext JE (DR 6561 / CR 4675), balanced.
# the four-eyes queues:
# GET /api/claims/reserve-approvals Β· GET /api/claims/payment-requests
Compliance mappingβ
Solvency II / IFRS 17 (claims reserves β technical provisions; loss payments β claims-paid β recorded cleanly for a later measurement slice) Β· DORA (claimsβlegacyβERPNext ICT interdependency; resilience = durable CDC + retried async GL post + idempotency) Β· governance (four-eyes + SoD + append-only approval audit = the threat-T7 control, a payout above authority can't be self-applied). Certification: BC02/BC03.
Status honesty β what's proven, what's gatedβ
- Proven live on prod (real, not synthetic): a reserve through the live SOAP Oracle legacy β CDC β
emitter β
claimsglβ JEACC-JV-2026-00010balanced β¬30,000. The four-eyes controls are active on prod (above-authority reserve/settle now returns202, not403). - The lesson captured in the case study: the claims producer was initially merged + dev-live but not promoted to prod β "merged β live"; each side of a cross-service chain needs its own promotion. Fixed + re-proven with a real transaction.
- Deferred: real Authentik OIDC on the claims API (header-based today, ADR-005); the proactive large-loss review board UI (the control + queue exist; a dedicated screen is a follow-up).
Detailed design: ADR-021 + the case study ktayl-core/docs/evidence/case-studies/clm-fin-claims-money-control.md
(both in the ktayl-core repo). Related: the Billing as-built (the premium chain)
and the legacy-core modernization (the claims Strangler).