Skip to content

About

Dependency-free, tested core of a mortgage servicing copilot: integer-cent money math, hash-chained audit trail, role-scoped PII access.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

servicing-copilot-core

A small, dependency-free, fully-tested demonstration of the correctness-critical core a mortgage servicing copilot has to get right — built to show the discipline in code, not just describe it.

Three things in mortgage servicing are not "UI bugs." A mistake in any of them is a financial or compliance event:

  1. Money math that can't silently lose cents. Per-diem interest (Actual/365-Fixed), payoff/discharge statements, LTV — integer cents, UTC day-count, half-up rounding applied once per period. → money.mjs
  2. An immutable, tamper-evident audit trail. Every copilot action is appended to a hash-chained log; mutating or reordering any past entry is detected by verify(). → audit.mjs
  3. Role-scoped access to borrower PII, no cross-deal leakage. servicer / broker / admin roles, field-level redaction (a broker never sees SSN or phone), hard denial across deals — and every denial is itself audited. → access.mjs

copilot.mjs ties them together: a payoff action that is access-checked, computed correctly, and written to the audit trail in a single call.

Run

node --test

4 tests, zero dependencies — money correctness, PII redaction, cross-deal denial, and audit tamper-detection.

Why this exists

This is the same "is the number / the access / the record exactly right?" discipline I used to find and fix silent wrong-results bugs in five production databases this month (see silentdrop). Mortgage servicing is the same problem with regulatory stakes.

About

Dependency-free, tested core of a mortgage servicing copilot: integer-cent money math, hash-chained audit trail, role-scoped PII access.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages