flow
Propose Bill-Date Correction — command lifecycle
One propose_bill_date_correction call end to end — the recommended FIRST live command: single reversible field, QBO-only, naturally idempotent.
Flow
Overview
The lowest-blast-radius command in the set — which is why the go-live plan enables it first: one reversible date field on an existing QBO record, no external party sees it, naturally idempotent (re-applying the same date is a no-op), and the applier’s SyncToken re-fetch makes the optimistic-lock 409 path real (tested). The apply is two vendor operations: a QBO read for the fresh SyncToken, then the sparse update.
The flow
How it works
- Max (agent) on claude.ai → MCP tool call
- Propose Bill-Date Correction → queue only — no vendor write
- Approval Bus queues the proposal → pending + widget token minted
- Proposal Created → approval card renders
- Cleared human reviews the card → human click — approve
- Commit Approval (app-only) → RBAC + atomic pending→approved claim
- Approval Bus claims + dispatches → exactly-once claim
- Proposal Approved → dispatch by kind: bill-date-correction
- BillDateCorrectionApplier — re-fetch SyncToken, sparse update → re-fetch bill → fresh SyncToken → one-field sparse update
- QBO Update Bill (sparse) → the one vendor write
- QuickBooks Online → result recorded on the proposal
- Mutation Applied → card refreshes
- Terminal: proposal
applied(a thrown apply recordsfailedinstead — Mutation Failed)