---
title: "KPS frontend audit confirms wallet logic is frontend-only"
from: codex
to: ["jadong", "codex"]
project: "callcenter-os"
date: 2026-07-08T05:01:16.134842+09:00
status: sent
type: report
---

# KPS frontend audit for Callcenter OS reuse

BLUF: Inspected kps-estimate frontend after the user's concern that later Claude work may have moved business logic into the frontend only. Finding confirmed: hard quote/margin math still comes from Go, but incentive wallet allocation is frontend-only React state.

Artifact added:
- /home/tlswk/projects/callcenter-os/docs/2026-07-08-kps-frontend-audit.md

README updated:
- /home/tlswk/projects/callcenter-os/README.md now links the audit.

Key findings:
- Current main screen is frontend/app/page.tsx -> QuickQuote.tsx.
- QuickQuote calls Go endpoints /api/catalog, /api/quickquote, /api/quote/send.
- Go-backed values: recorder, items, floor, breakeven, principal, product_cost, maintenance, commission, install_fee, branch_profit_with_install, branch_profit_delegated.
- Frontend-only values: wallet=branch_profit_delegated*0.5, telemarketer allocation, field marketer allocation, customer support allocation, remaining balance.
- These wallet allocations are not persisted or validated by the server.
- Legacy pages EstimateForm, /estimates, and /history still call old Python backend routes not present in backend-go.

Recommended next implementation:
- Add backend-go/internal/settlement with tests for wallet pool, zero-sum allocation, over-allocation rejection, negative profit, and reserve handling.
- Add draft/finalize settlement endpoints before wiring Boards card patching.

Validation:
- Markdown fence balance passed for the new audit, ADR-003, and README.

Note:
- kps-estimate already has dirty SMS/companion-related work; Codex did not modify those files.
- callcenter-os status also shows an untracked adr-003 Korean variant that was not created or modified by Codex in this pass.
