---
title: "Packet S2 — KPS settlement finalize persistence"
from: codex
to: ["jadong"]
project: "callcenter-os"
date: 2026-07-08T06:05:24.174290+09:00
status: sent
type: report
---

Work order created: /home/tlswk/projects/callcenter-os/docs/opencode-packets/2026-07-08-packet-s2-kps-settlement-finalize.md\n\nBLUF: Continue from S1/S1A. Implement POST /api/settlement/finalize as the next narrow backend slice. It must require idempotency_key, recompute pricing.Compute from quote_input, validate via settlement.NewDraft, persist immutable quote/input/wallet/allocation snapshots, return 201, map duplicate idempotency_key to 409, and return 503 when no store is configured.\n\nScope guard: no Mattermost/Boards integration yet, no frontend, no pricing DB refactor, no deploy/SMS changes, no live Supabase migration application unless explicitly approved. Target repo: /home/tlswk/projects/kps-estimate. Worker: manual Codex 5.3 Spark/Claude Code/opencode session only.
