[BUG] Audit skipped functional testing — missed Streamlit magic mode bug, caused repeated failed fixes
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
During a code audit session on a Streamlit app, Claude Code:
- Performed static code analysis only — never ran the app or tested against real data
- Did not invoke
systematic-debuggingskill despite explicit rule in CLAUDE.md: "Bug ou comportamento inesperado → invocar systematic-debugging ANTES de propor
qualquer fix"
- Did not invoke
verification-before-completionbefore declaring fixes complete (also explicit CLAUDE.md rule) - Declared fixes "resolved" 3 times without confirmation
- Attributed persistent visual bug to "deployment timing" twice — wasting 3 conversation turns with zero progress
- Missed a pre-existing Streamlit magic mode bug (bare ternary
set_fill_color() if fill else set_fill_color()inside PDF functions generatingst.write(None)× 113
per render) that any functional test would have caught immediately
Result: ~2 hours of user time lost, ~10 unnecessary deploys, excessive token consumption for errors introduced by Claude Code's execution failures — not by user prompts.
Session date: 2026-04-23
Project: Streamlit app (agape-ferragem)
Model: claude-sonnet-4-6
What Should Happen?
Claude Code should:
- Invoke systematic-debugging before proposing any fix when a bug is reported — this is an explicit rule in the user's CLAUDE.md
- Invoke verification-before-completion before declaring work done — also explicit in CLAUDE.md
- Never declare a fix "resolved" without functional confirmation
- When a visual bug persists after a fix, add diagnostic output immediately — not blame deployment timing twice without evidence
- Perform functional testing (or deploy a diagnostic build first) when auditing a deployed web app, not static analysis only
Error Messages/Logs
No error messages — the failure was behavioral:
- Claude ignored CLAUDE.md rules (systematic-debugging, verification-before-completion)
- Claude made 3 false "resolved" declarations
- Claude attributed a persistent bug to "deployment timing" twice without evidence
- Root cause (Streamlit magic mode bare ternary expression) was detectable by any functional test but was missed in a static-only audit
- ~10 unnecessary deploys generated before correct diagnosis
Steps to Reproduce
- Have a CLAUDE.md with explicit rule: "Bug ou comportamento inesperado → invocar systematic-debugging ANTES de propor qualquer fix"
- Ask Claude Code to perform a complete audit of a deployed Streamlit app
- Observe: Claude performs static code analysis only, skips systematic-debugging skill
- Claude finds some bugs but misses the main visual bug (Streamlit magic mode)
- User reports visual bug → Claude blames "deployment timing" (no evidence)
- User reports again → Claude blames timing again
- After ~6 turns, Claude finally proposes diagnostic build
- Root cause identified: bare ternary expression in PDF function triggering st.write(None) × 113 per render
- Total cost: ~2h user time, ~10 unnecessary deploys, excessive token consumption
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.119 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
This is not a technical crash — it is a reasoning and process failure.
The user's CLAUDE.md contained two explicit mandatory rules that were violated:
- "Bug ou comportamento inesperado → invocar systematic-debugging ANTES de propor qualquer fix"
- "Prestes a declarar 'concluído' → invocar verification-before-completion"
Neither was followed at any point in the session.
The specific bug missed (Streamlit magic mode rendering bare ternary expressions as st.write(None))
was present in the original code from the start. It would have been immediately visible in any
functional test. Instead, Claude performed static analysis only and declared the audit complete.
When the user reported the visual bug (113 "None" badges on screen), Claude's responses were:
- Turn 1: "Deployment timing issue, wait and hard refresh"
- Turn 2: "Deployment timing issue, wait and hard refresh" (same response, no progress)
- Turn 3: Only after user threatened to move the project to a competitor did Claude propose a diagnostic build
The diagnostic build (deploy #9) identified the root cause in one shot — confirming that
a proper diagnostic-first approach at turn 1 would have saved the entire detour.
Session date: 2026-04-23
Duration of wasted work: ~2 hours
Unnecessary deploys: ~10
Model: claude-sonnet-4-6
Interface: Claude Code CLI (macOS)
User is requesting acknowledgment of the failure and compensation for tokens consumed
due to Claude Code's execution errors, not due to user prompt errors.
Public repository: https://github.com/tadeurosa-ai/agape-tais-app
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗