The Prompt BakeryTemplates and prompts

Fix · Problems with AI tools

The tests pass, but the AI changed the tests, not the code

Blocks your work

What you may see

  • Everything is green after the AI "fixed" it
  • A test was deleted or weakened

Most likely cause

When asked to make tests pass, a tool can take the shortest way: change the test, skip it, or hard-code the expected result.

Check first (about two minutes)

  1. Run git diff on the test files: were tests changed or removed?

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. Show every change to test files in this work, and explain why each was needed.
  2. Put back any test that was weakened, skipped or removed without a good reason, and fix the code so the real behaviour passes.
  3. Search the code for special cases that detect the test input and return fixed answers.

Do not do this

  • Do not skip failing tests.
  • Do not change expectations to match wrong behaviour.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.