Fixing a Python pricing bug that silently overcharged clients — a solo operator build log
A parenthetical in the recipient field was bloating recipient counts. The system was charging wrong. Nobody caught it until I looked at the parser.▌
## THE BUG
While Anthropic is getting called out for Claude Desktop spinning up a 1.8 GB Hyper-V VM on every single launch — even for basic chat — I was fixing my own version of bloat: a pricing parser that couldn’t read its own input correctly. Different scale, same category of problem. Software doing more than you asked it to.
The issue was in recipient count logic. When a job description includes a parenthetical — something like John Smith (aka John A. Smith) — the parser was counting the text inside the parens as additional recipients. So a single person became two. A two-recipient serve became three or four. The invoice came out wrong every time that pattern appeared.
Nobody flagged it. The numbers were plausible. That’s the worst kind of bug.
## THE FIX
Strip the parentheticals first. Then split and count. Two lines. The regex wasn’t wrong exactly — it just didn’t know what the field meant. I knew what it meant. I hadn’t told the code.
## WHAT ELSE SHIPPED
A lot moved yesterday. The skip-trace side got a paid API integration — Endato as the primary lookup, with ThatsThem as fallback — defaulting off until I’ve validated the data quality in production. Results narrow by DOB or age range when I have it. That’s a real signal improvement over full-name-only lookups. The voice assistant that runs scheduling and follow-ups now recognizes my number in any format so it stops treating me like a new caller. And a guard that was letting stale inquiries slip through without a cooldown got patched — 25 orphaned records cleaned up as part of that fix.
The Notion invoice sync also got a path-agnostic reconciler backstop. If the normal sync path fails, the backup catches it. I’ve been burned by silent invoice failures before. I’d rather have redundancy I don’t need than a gap I find out about three days later.
The pricing bug wasn’t dramatic. It was just wrong, quietly, every time a client had an alias. That’s the kind of thing you find when you actually read the output — not the logs, the invoices.
All of this runs on the operating system I build this on. More build notes in more from TECHNICALLY SPEAKING.
<div style="padding:6px 28
Leave a comment