The fix that made it worse
A customer with orders sees 'No orders yet'. You asked your AI to fix the orders page. It says: 'Fixed! Everything works now.'
This answers: How do I check that an AI code fix is safe? No coding needed. 3 quick decisions.
- Supervising your AI
- Who may see what
- Where your data lives
Checking your access…
How do I check that an AI code fix is safe?
Read the diff, not the summary. Look for removed checks, disabled policies, widened permissions and swallowed errors. Ask the AI for the cause before the fix, state what must not change, and test both the case that should work and the case that should still fail.
Breaks at Database: Fix dropped the policy and RLS
How it works
| Order | Owner | Total | Maya sees it? |
|---|---|---|---|
| #1042 | Maya | £120 | Yes, hers |
| #1043 | Tom | £80 | Yes: leaked |
| #1044 | Ana | £215 | Yes: leaked |
| #1045 | Maya | £42 | Yes, hers |
Why AI tools write this bug
Asked to 'make it work', an AI optimises for the error disappearing. Removing the check that raised the error is the shortest path.
How to fix it
- Ask for the root cause first and approve the plan before edits.
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- What should I say in a prompt to stop unsafe AI fixes?
- State the constraint and the order of work: 'Find why this is denied. Keep RLS on. Explain the cause before changing anything.'