Sub topic 9
Verifying with Your Own Checks, Not the Agent's Summary
This chapter assumes you can run your project's tests, linter, type checker, and build from the command line. It also assumes you have already read the diff and checked that tests were not weakened.
Why the summary is not evidence
At the end of a run, an agent usually writes a summary such as "Renamed the loader, updated all callers, tests pass." The summary describes what the agent intended or believes. It may be wrong, and it may leave things out. The agent may have run only part of the test suite, or it may have run tests against stale code. It may also describe a change it planned but never made.
Treat the summary as a list of claims to check. Each claim is true only when a command you ran confirms it.
Run the checks yourself
Run the project's own checks from a clean shell, on the agent's branch. Start with the fastest and cheapest, so failures show up early.
git status --short # confirm you are checking the state you reviewed
ruff check . # linter
mypy src # type checker
pytest -q # full test suite, not only the files the agent touchedUse the exact commands your CI uses. If CI runs pytest --strict-markers and you run plain pytest, you can pass locally and fail in CI.
What each check can and cannot tell you
| Check | Catches | Misses |
|---|---|---|
| Linter | Unused imports, style violations, some bugs | Wrong logic |
| Type checker | Invented functions, wrong argument types, broken call sites | Behavior that is type-correct but wrong |
| Tests | Regressions covered by existing tests | Behavior no test covers |
| Running the code | Real end-to-end behavior | Cases you did not try |
A passing result is only as strong as its coverage. If the agent added a feature and no test exercises it, a green test run says nothing about that feature.
Check the checks
Before trusting a green result, confirm the checks actually ran.
- Look at the test count. If the suite had 212 tests before and shows 198 now, find out why.
- Confirm the commands were not configured away. Compare config files with the baseline using
git diff -- pyproject.toml setup.cfg tox.ini .github/. - Make sure the tests can fail. Temporarily break the new code, run the relevant test, and confirm it goes red.
git diff --stat main -- pyproject.toml .github/ tox.ini
pytest -q --co -q | tail -1 # prints the number of collected testsEdits to linter rules, test configuration, or CI files are a common way for a change to "pass" without being correct.
Run the code
Tests rarely cover everything a multi-file change affects. Exercise the changed path directly. For a renamed config loader, start the application with a real config file, then with a missing one, and read the output.
python -c "from config.loader import load_config; print(load_config('settings.toml'))"
python -c "from config.loader import load_config; load_config('missing.toml')"The second command should fail in the way the old code did. A different error type or a silent default is a behavior change you need to catch.
Look for what the checks cannot see
Search for leftovers that the tools accept but you should not:
git grep -nE 'old_loader|load_config_v1' -- src tests docs
git diff main -U0 | grep -nE '^\+.*(print\(|TODO|breakpoint\()'The first command finds references to the old name that were missed, including in docs and strings. The second finds debug output and unfinished work added in the diff.
Record what you verified
Note which commands you ran and their results, for example in the commit message or pull request. If something later breaks, you can see what was and was not covered.
Exercise
After a run, the agent reports "all 150 tests pass." You run pytest and see "138 passed." What do you check first, and why?
Show answer
Find out why 12 tests are missing from the count. Compare the collected test count with the baseline using pytest --co -q. Then check git diff --name-status for deleted or renamed test files, and diff the test configuration and markers. Fewer tests than before suggests that tests were deleted, skipped, or excluded. The agent's summary does not match what you measured, so use your numbers.