Testing artifacts · 2026-08-22 · Peyton WP prod

Pulse/Billing MTD Cost Undercount — click-through results

Real browser (Claude-in-Chrome computer-use) against https://platform.mystflo.com, plus direct read-only DB reconciliation (rolled-back transaction, prod). Bug: #3827. Fix: PR #3833 (merged, deployed). Follow-up: #3834. Plan: docs/testing/pulse-billing-metrics-clickthrough.md.

Pulse's "MTD Cost" tile and /billing's "This month so far" undercounted real spend by ~24x under the prepaid wallet rail — $3.00 displayed vs. $71.24 real wallet spend, same account/month. Root cause: those two surfaces never got the wallet-ledger read /billing/usage received at the prepaid cutover (#3631). Fixed, reviewed (combined quality/security/CTO + Billing Agent + Chief Designer, all PASS), merged, and verified live below.

Scoring rollup

ScenarioResultNotes
CT-PULSEBILL-01 — Pulse MTD tile vs. Billing "This month so far" vs. Usage page vs. wallet ledger, pre-fixFAIL$3.00/$0.00 AI (Pulse + Billing) vs. $71.24/$4.49 (Usage + wallet ledger) — same account, same month
CT-PULSEBILL-02 — direct DB reconciliation (wallet_transactions vs. ai_usage vs. assistant_run_logs)FAIL (2 real gaps found)ai_usage table had 492 real rows/$5.86 SUM while the UI showed $0.00 (read-side bug, not missing data); assistant_run_logs had 1 row vs. 26 wallet 'run'-category debits
CT-PULSEBILL-03 — live discriminator: does AI-usage $0.00 self-resolve without a backend change?PASS (informative)Plain reload flipped $0.00 → $5.86 (matching DB exactly) with zero backend touched — confirmed the bug was a frontend race, not a broken/undeployed endpoint
CT-PULSEBILL-04 — post-fix live verification, all 3 surfaces + wallet ledgerPASSPulse $71.24 == Billing "Spent this month" $71.24 == Usage page $71.24 == wallet ledger sum, all matching to the cent
CT-PULSEBILL-05 — postpaid fail-safe block stays hidden under prepaidPASSNo "This month so far" section rendered on /billing post-fix — WalletBalance is the only hero, confirming the modeKnown gate
CT-PULSEBILL-06 — transient error on /billing reloadOBSERVED, not reproducedOne "Something went wrong" error-boundary trip during verification; a manual reload recovered cleanly and it did not recur — logged, not filed, given zero repro

CT-PULSEBILL-01/02 — the discrepancy, pre-fix

Wallet ledger (wallet_transactions, read-only DB query, rolled back): ai: -$4.49 (371 rows), run: -$66.75 (26 rows), topup: +$280.00 — net spend $71.24. This matched /billing/usage and /billing's own "Recent Activity" ledger exactly. Pulse's MTD tile and /billing's "This month so far" both showed $3.00 / AI Usage $0.00 for the identical window — a same-page, same-account, ~24x contradiction.

DB reconciliation went deeper than the display bug: ai_usage table had 492 rows summing to $5.86 for the exact user_id/window — real data existed, so the $0.00 shown to the founder was confirmed to be a read-side bug, not missing data. assistant_run_logs had only 1 row for the month against 26 real wallet 'run'-category debits — a much bigger structural gap than any preview/test-trigger exclusion could explain.

CT-PULSEBILL-04/05 — post-fix, live on prod

Pulse MTD Cost tile showing $71.24
Pulse Overview, post-deploy: MTD Cost $71.24 (Runs $66.75 · AI Usage $4.49) — matches the wallet ledger exactly.
Billing Usage page showing Total Cost $71.24
/billing/usage, same session: Total Cost $71.24, AI Usage $4.49 — unchanged by this PR, now agreeing with Pulse instead of being the lone correct surface.
Billing main page showing Spent this month $71.24 and no postpaid block
/billing main page: "Spent this month $71.24" matches; the old postpaid "This month so far" section correctly does not render at all — WalletBalance is the only hero shown, confirming the modeKnown fail-safe gate (part of #3827's fix).

CT-PULSEBILL-06 — one transient error, not reproduced

Something went wrong error boundary on the Billing page
One "Something went wrong" error-boundary trip navigating into /billing during this verification pass. A manual reload recovered cleanly (see figure above) and repeated attempts afterward never reproduced it. Logged here for the record, not filed as an issue — no evidence yet ties it to this PR versus a pre-existing, unrelated flake.

What did not get walked