The code review's pasted new files did not stop its reads #418

Closed
opened 2026-11-08 00:04:10 -05:00 by cmoriarty · 1 comment
Owner

What happens. run 181's review brief carried every new file (157k characters) and the review still read 12 of them in 28 reads, ending at 165k.

Fix. either drop the paste for the review and keep "new files are not in the diff: read them", or paste and say once that a pasted file is not to be read. Measure on the next run before choosing.

Done when. a review of a new-files change reads fewer than five of the pasted files.

From run 181, the verifying run after #407; the log is docs/design/measurements/work/run-180/findings.md.

**What happens.** run 181's review brief carried every new file (157k characters) and the review still read 12 of them in 28 reads, ending at 165k. **Fix.** either drop the paste for the review and keep "new files are not in the diff: read them", or paste and say once that a pasted file is not to be read. Measure on the next run before choosing. **Done when.** a review of a new-files change reads fewer than five of the pasted files. From run 181, the verifying run after #407; the log is `docs/design/measurements/work/run-180/findings.md`.
Author
Owner

Shipped in PR #421 (ff9381d8), change briefs-after-run-181. Measured on run 181 first: the paste added about 40k tokens of brief and the review still read 12 pasted files in 28 reads, so the "do not read one again" sentence does not hold on its own. Chosen: keep the paste and make the rule bind. The review's brief builder records what it pasted whole (<run>/tmp/pasted.json, path, mtime, size) and the guard answers a read of such a file, while it is unchanged, with "<path> is pasted whole in your brief under ### <path>, and has not changed: use it from there" instead of the file. A file the review edited reads as normal. Tests in tests/agent/test_path_guard.py. Done when a review of a new-files change reads fewer than five pasted files: the next Scratch run.

**Shipped in PR #421 (ff9381d8), change `briefs-after-run-181`.** Measured on run 181 first: the paste added about 40k tokens of brief and the review still read 12 pasted files in 28 reads, so the "do not read one again" sentence does not hold on its own. Chosen: keep the paste and make the rule bind. The review's brief builder records what it pasted whole (`<run>/tmp/pasted.json`, path, mtime, size) and the guard answers a `read` of such a file, while it is unchanged, with "`<path>` is pasted whole in your brief under `### <path>`, and has not changed: use it from there" instead of the file. A file the review edited reads as normal. Tests in `tests/agent/test_path_guard.py`. Done when a review of a new-files change reads fewer than five pasted files: the next Scratch run.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#418
No description provided.