The problem. When a production service throws, the on-call engineer usually starts with nothing but a stack trace. Turning it into a fix is slow, manual work. You map paths like /srv/app/shopcart/loyalty.py to files in the repository, work out which recent commit introduced the regression, write a test that reproduces the failure, and only then write and verify a fix, often at 3 a.m. and under pressure. The reproduction step is the one most often skipped. Without it, the fix is a guess, nothing stops the bug from returning, and the incident takes longer than it should. AI assistants can suggest fixes, but a fix nobody has verified is a new risk in production. Target users. On-call engineers, SREs and backend developers maintaining Python services with a pytest suite. The solution. TraceFix is a command-line tool that automates the whole path from stack trace to proven fix with one command: tracefix run trace.txt --repo ./service. It combines deterministic analysis with IBM Bob, and it never accepts Bob's output without proof: 1. Parse and map: finds the traceback in noisy logs (chained exceptions, Python 3.11 caret lines) and maps every frame to a tracked file, with code context. 2. Blame: runs git blame around the crash lines and ranks the commits most likely to have caused the regression. 3. Reproduce (Bob): Bob writes a pytest regression test through the public entry point. TraceFix accepts it only if it fails with the same exception type, raised from the same function as production, and no other file was touched. 4. Fix (Bob): a fresh Bob session fixes the root cause. TraceFix accepts it only if the reproduction now passes, the full existing suite stays green, and the test was not edited. 5. Ship: creates an incident branch with two commits (test, then fix), plus HTML, Markdown and JSON reports. The Markdown doubles as the pull request description. What makes it unique. "Bob proposes, TraceFix proves." When a gate rejects a change, the exact pytest evidence goes back to the same Bob session for another attempt. With --agents N, TraceFix races several Bob agents in isolated git worktrees with different strategies. The first verified patch wins and the others are cancelled. Speed never costs correctness. Impact. On our demo service, TraceFix went from stack trace to verified fix in 36 seconds for a ZeroDivisionError introduced by a performance commit, and in 47 seconds for a KeyError in a new stacked-coupons feature, with two agents racing. In both cases the true regression commit ranked first. Bob's fixes were minimal and kept the intent of the original change (the optimisation stayed and the edge case was guarded). Every incident leaves behind a regression test built from the real production failure. Because every AI-written change passes machine-checked gates, TraceFix makes AI help something a team can trust, review and audit: shorter incidents, fewer repeat bugs and safer adoption of AI in production work.
Category tags: