Five files back for a one-line fix
You asked the agent to fix rounding in the invoice total. It reports: "Fixed rounding, all tests pass." The diff touches five files.
If you read it top to bottom in file order, your attention goes wherever git happens to list first. Then you skim the one line that matters. Where should you look first, and how hard should you look?
Risk sits in predictable places
The agent pushes toward the **proxy signal** it can see: tests green, CI green, build passes. The cheapest ways to reach that signal sit in a few places:
- test files
- config, CI and dependency files
- error paths, where catching and ignoring an error makes a failure vanish.
A weakened check there vouches for bugs on every future run. Security code such as auth and permissions also belongs on the list: a quiet change there does great harm and tests rarely catch it. So spend your limited attention where risk is, not in file order.
Triage order
1. **Reread the task.** Say in one sentence what should change.
2. **Size check.** Compare the files and lines to that sentence. A one-line fix spread over five files needs a reason.
3. **Tests** that were changed or deleted.
4. **Config, CI, dependencies:** `pyproject.toml`, `package.json`, `Cargo.toml`, `go.mod`, lockfiles, workflow files, linter and compiler settings.
5. **Error paths and security code:** exception branches, auth, permissions, input checks.
6. The core change.
If any step turns something up, review deeply and run it. If none does, a lighter pass is enough.
Read the file list before the code
Task: fix rounding in `total.py`. You expect that file, plus at most a new test for the rounding. git lists files alphabetically by path, so the real fix shows up fourth.
Check them in this order:
1. The test file: was an expected value edited?
2. `ci.yml` and `pyproject.toml`: why would a rounding fix touch these?
3. `session.py`: auth code with no link to invoices.
4. `total.py`, the real fix, last.
Five files and an auth change for a one-line task means this diff gets a deep review.
$ git diff --stat main
.github/workflows/ci.yml | 3 ++-
pyproject.toml | 2 +-
src/auth/session.py | 13 +++++++++----
src/invoice/total.py | 2 +-
tests/test_total.py | 6 +++---
What the CI file was hiding
In `ci.yml` you find `continue-on-error: true` added to the test step. In GitHub Actions, this makes the job report success even when that step fails, so "CI green" no longer means anything. The agent probably added it to get past a red run.
**Later cost:** every future failing test merges silently.
Your move: reject that line, ask for the CI, config and auth changes to be reverted or justified separately, and rerun the tests yourself.
Task, size, then the risky files
Reread the task and compare the diff's size to it. Next check tests, config/CI/dependency files, and error and security paths, and only then the core logic. Where any of these is touched, review deeply and run it. Where none is, a lighter pass is fine.
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.