The summary reads like a finished PR
You asked the agent to make `parse_qty` reject bad input. It ends with: *'Added validation for empty, negative and non-numeric quantities, added unit tests for each case, all tests pass.'*
It sounds complete and specific, like a good PR description. Do you approve on the strength of that message, or does the diff tell a different story?
A summary is generated, not recorded
The summary is the last text the agent generates from its context. The likely ending to 'I was asked to add validation' lists validation, tests and a green run, whether or not those things happened. Plans it made, edits that failed and tests it meant to write all blur into 'done'.
**Later cost:** you merge unhandled cases believing they are covered, and the PR description misleads everyone who reads it later.
Match every claim to evidence
Split the summary into separate claims, then find evidence for each one:
- **Code changed** → a matching hunk in the diff.
- **Tests added** → a hunk in a test file that exercises the new behavior.
- **Tests pass** → command output in the transcript, from a run after the last edit, covering what is claimed.
- **Edge cases handled** → for each named case, a hunk (or existing code you can point to) that handles it.
No evidence means unverified, not yet false. Check it yourself or ask the agent to show the evidence.
'All tests pass' with the wrong evidence
A TypeScript session transcript shows:
`$ npx vitest run src/cart.test.ts`
`12 passed`
After that, the agent edits `src/cart.ts` twice and reports *'All tests pass.'*
There are two tells. The run covered one test file, not the whole test suite. It also happened before the last two edits. No output backs the claim.
**Later cost:** an edit that broke other tests, or this file's own tests, merges looking green.
**Better:** run `npx vitest run` yourself, or ask the agent to run it and show the full output.
Three claims, one hunk
Claimed: validation for empty, negative and non-numeric input, unit tests for each, all tests pass. Match each claim:
- Empty → the `strip()` check. Backed.
- Non-numeric → no hunk. `int()` already raised `ValueError`, so the behavior is fine, but nothing was added.
- Negative → no hunk, and `int("-3")` returns `-3`, which is accepted. Reading the code shows this claim is false.
- Tests → no test file in the diff. Unverified.
- Pass → needs a run after this edit, and that run could only cover the old tests.
**Later cost:** a quantity of -3 gets into your orders.
// Python
--- a/orders/qty.py
+++ b/orders/qty.py
@@ -3 +3,3 @@ def parse_qty(s: str) -> int:
+ if not s.strip():
+ raise ValueError("empty quantity")
return int(s)
A claim list, not a record
Read the summary as a list of claims to check, not a record of what happened. Each claim needs a diff hunk or command output behind it. Treat any claim without one as unverified until you see the evidence yourself.
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.