Your agent says the tests passed. Did they run?
Three questions to ask before you trust a green test report from an AI coding agent, plus how to automate the answers.
“All 24 tests pass. Ready to ship.”
That summary appears in almost every AI coding session, and on its own it tells you very little. Four common situations produce the exact same wording:
- The tests ran ten minutes ago, before the last three edits to your working tree.
- The suite passed earlier in the session, and the model recalled that output as current.
- The suite ran and passed after the agent softened a failing assertion.
- No command ran; the model read its own edits and assumed the suite would pass.
Ask three questions before you merge
1. Which exact code did that run against? Ask for a commit or snapshot hash you can match against the branch staged to ship.
2. Did it run after the final edit, without cache? Results from two refactors ago or remembered shell outputs do not cover current files on disk.
3. Which assertion tests the behavior I asked for? A 24-test suite can pass completely while leaving your new edge case untested.
When an agent cannot provide concrete answers for all three, you only have an unverified summary.
Five habits that catch stale or hollow test runs
- Ask the agent to print the exact command it ran and the raw exit status.
- Re-run the command once in a clean terminal yourself so leftover shell state cannot mask failures.
- Check
git diffon the test files before reading application code to catch edited assertions. - Make the agent show the file and line number of the assertion covering each requirement.
- Match the timestamp of the run to the last commit on the branch.
Doing all five by hand catches stale or incomplete runs, though repeating those checks across dozens of changes belongs in your verification tooling.
What changes when the Oystro CLI runs the checks
| Question | Checking by hand | With the Oystro CLI |
|---|---|---|
| Which code? | Compare commit hashes yourself | Exit code and output digest bound directly to the snapshot hash |
| Was it fresh? | Re-run in a clean shell yourself | Declared test commands executed live with no cached shortcuts |
| Which assertion? | Ask the agent to cite lines | Every requirement mapped to a test that actually executed in the run |
| Did the tests change? | Inspect git diff on test files |
Tests locked when you sign Gate 1; edits are refused mid-build |
| Can I trust the review? | Read the diff yourself | Clean-context audit quotes file, line, and passing assertion per item |
The Oystro CLI runs the test command outside chat memory and writes a receipt recording what command ran, on which code tree, and with what exit code.
How that plays out on a small bug fix
Take a simple validation rule: running notes add "" must exit with code 2 and create no file.
Before editing source code, the agent writes a spec splitting that behavior into two concrete checks (“exit code is 2” and “no file is created”) paired with a test command. You review that plan and sign Gate 1, locking owned files and test files.
Next, the agent writes the fix, runs the suite, and passes the change to review. An independent audit checks each requirement by file, line number, and passing assertion. If “no file is created” lacks an assertion, the audit blocks the slice immediately.
Before Gate 2, verification checks that the code, spec, scope, and test results still match the audited snapshot. Opening Gate 2 shows a clean summary backed by verified runs. You spend a few minutes at Gate 1 reviewing the plan and a couple of minutes at Gate 2 reviewing the proof.
What to ask on every run
Ask what command ran, which commit it ran against, and which line of test code verifies the behavior you asked for. Verifiable answers keep shipping calm; unverified confidence leaves you trusting chat memory.
Ship AI-Written Code Without Reading Every Line
You decide what gets built and approve what ships, while automatic checks keep your coding agent from skipping tests, weakening assertions, or claiming work that never ran. Install the Oystro CLI, connect your agent with oystro mcp, and open oystro ui to inspect a Gate 1 approval, a verification summary, and a signed release.