Pre-approval engine
|
|
| ID |
MOD-029 |
| System |
SD05 |
| Repo |
bank-credit |
| Build status |
Deployed |
| Deployed |
Yes |
| Last commit |
19b0610 |
Runs affordability and credit scoring on existing customers nightly. Produces pre-approved offer stored in Postgres. Customer acceptance is one-tap — no new assessment required. See ADR-018.
Module dependencies
Depends on
| Module |
Title |
Required? |
Contract |
Reason |
| MOD-128 |
Credit bureau enquiry and CCR integration |
Required |
— |
Bureau enquiry data is consumed transitively via MOD-028 credit scores; credit.bureau_consents stand-in is also managed by MOD-128. |
| MOD-028 |
Credit score & risk rating |
Required |
— |
credit.credit_scores is read for the latest risk rating and score per application; MOD-029 V002 adds the FK constraint from credit_scores.application_id to credit_applications. |
| MOD-027 |
Affordability calculator |
Required |
— |
credit.affordability_assessments is read for the latest affordability result per application; MOD-029 V002 adds the FK constraint from affordability_assessments.application_id to credit_applications. |
| MOD-104 |
AWS shared infrastructure bootstrap |
Required |
— |
AWS shared infrastructure provisioned by MOD-104 (EventBridge buses, KMS PII CMK, Lambda execution role) is required before this module can be deployed. |
| MOD-103 |
Neon database platform bootstrap |
Required |
— |
Neon database and schema provisioned by MOD-103 must exist before this module can create credit.credit_applications and credit.disclosure_acknowledgements and read or write Postgres. |
Required by
| Module |
Title |
As |
Contract |
| MOD-132 |
Loan restructure and variation workflow |
Hard dependency |
— |
| MOD-162 |
Loan facility & component manager |
Hard dependency |
— |
| MOD-167 |
Credit card facility engine |
Hard dependency |
— |
Policies satisfied
| Policy |
Title |
Mode |
How |
| CRE-002 |
Responsible Lending Policy |
AUTO |
Handler reads credit.affordability_assessments for the application and rejects with decision_type=DECLINE when the latest result is FAIL or absent — no code path approves a credit application without a passing affordability assessment; enforced by source-level scan and negative integration test. |
| CON-004 |
Product Disclosure & Sales Practice Policy |
GATE |
POST /credit/applications/{id}/accept requires a disclosure_acknowledgement_id referencing a credit.disclosure_acknowledgements row recording the exact offer terms shown (content_hash covers rate, term, total interest, total cost) — returns 403 DISCLOSURE_NOT_ACKNOWLEDGED without it; no acceptance path bypasses this gate. |
| CRE-003 |
Credit Decisioning & Scorecard Policy |
LOG |
Every credit.credit_decisions row carries affordability_assessment_id FK, credit_score, risk_rating, model_version (via score reference), and policy_refs — enforced by ADR-048 Cat 1 immutability trigger; structural test confirms non-null model_version and affordability_assessment_id on every persisted decision. |
Capabilities satisfied
| Capability |
Title |
Mode |
How |
| CAP-065 |
Pre-approval engine (nightly eligibility scoring) |
AUTO |
Nightly EventBridge Scheduler scan over customers with cdd_tier IN (SIMPLIFIED, STANDARD) and no live pre-approval offer; applies affordability + scoring chain and writes pre-approval offers (decision_type=PRE_APPROVE, decision_source=PRE_APPROVAL_ENGINE) for eligible customers; batch size AppConfig-overridable (1,000 dev / 10,000 prod). |
Part of SD05 — Credit Decisioning & Loan Platform
Compiled 2026-05-22 from source/entities/modules/MOD-029.yaml