

Reconciliation Demo Overview
Reference implementation · synthetic data
Google Apps Script & TypeScript Engineer — Shared TypeScript core tested via
InMemoryGasAdapter and bundled to dist/Code.js (102,010 bytes) for clasp, automating 3-way reconciliation across POS order exports, payment processor settlements, and bank deposit statements.Key safeguards:
LockService.getScriptLock() prevents trigger races, per-file PARSE_ERROR isolation keeps valid sibling CSVs moving, and Ingested_*/Quarantine hashes commit only after ledger, Open_Items, and Audit_Log writes complete without deadline truncation.Parses messy UTF-8 BOM and quoted-comma CSVs into integer cents, reconciles across runs via
Open_Items (handling both POS-first and bank-first arrivals across T+1..T+3 business days), verifies POS vs processor gross equality (AMOUNT_MISMATCH), and prevents fallback deposit double-claiming.Optional Gemini triage (
x-goog-api-key) validates JSON responses against strict enum allowlists with automatic deterministic rule fallback.Verified on
500 seeded synthetic POS orders ($76,757.99 POS gross; 468 matched at 93.6% / $71,519.70; 24 actionable exceptions / $2,403.49 exposure; 12 suppressed T+N alerts; 4 quarantined duplicates / $264.62 blocked with $0 ledger impact) and 25/25 passing Vitest specs.Built with AI-assisted tooling; architecture, review, and tests by me.
0 likes · 3 views · Nov 20, 2026
Reference implementation (synthetic data): TypeScript Google Apps Script (clasp) 3-way POS/Processor/Bank reconciler with SHA-256 idempotency & LockService.