Skip to main content
Information System

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)
DecisionChoiceRef
Ownership splitworkflow in ktayl-claims Β· GL-only seam in ktayl-core, one-way async eventADR-021
EmissionCDC-driven (the projector computes the reserve/settlement movement) β€” not the command pathADR-021
GLadopt ERPNext β€” balanced Journal Entries (never rebuild a ledger)BILL-014 pattern
Controlsfour-eyes (approver β‰  requester) + SoD on payments (request β‰  approve β‰  execute) + large-loss reviewADR-021

As-built β€” the CLM-FIN epic​

SliceWhat's live
CLM-FIN-01 GL seamclaimsgl 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 emitterktayl-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-eyesAbove-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 workflowA 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 proofCLAIMS_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 β†’ JE ACC-JV-2026-00010 balanced €30,000. The four-eyes controls are active on prod (above-authority reserve/settle now returns 202, not 403).
  • 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).