The code review's paste budget goes to configuration files and leaves the source to be read #427

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

What happens. Run 182's code review brief pasted 29 new files whole and listed 25 as "not pasted: read it". The paste runs in git status order until 80,000 characters (MAX_CODE_TOTAL_CHARS), so it spent itself on .dockerignore, Dockerfile, README.md, package.json and every client component, and left out the engine (game.ts 427 lines, deck.ts 74, rounds.ts 13, types.ts 118), the server (rooms.ts 393, index.ts 45, static.ts 61), all their tests and the tsconfigs. The review then read exactly those 24 files in 30 reads (braid#425, finding 13). The guard from braid#418 answered nothing, rightly: none of its reads was of a pasted file.

Fix. Order the paste by what a reviewer needs: source before tests, tests before configuration and documentation; a file under a few hundred lines is always pasted; the budget is spent on the long files last, and only a lock file or a generated file is left to a read. Say in the brief, for the files left out, why (too long) and their size, as it does now.

Done when. On run 182's commit (its worktree is kept), the brief pastes the engine, the server and their tests whole, and a replay of the review step reads under five files.

From run 182 (braid#425).

**What happens.** Run 182's code review brief pasted 29 new files whole and listed 25 as "not pasted: read it". The paste runs in `git status` order until 80,000 characters (`MAX_CODE_TOTAL_CHARS`), so it spent itself on `.dockerignore`, `Dockerfile`, `README.md`, `package.json` and every client component, and left out the engine (`game.ts` 427 lines, `deck.ts` 74, `rounds.ts` 13, `types.ts` 118), the server (`rooms.ts` 393, `index.ts` 45, `static.ts` 61), all their tests and the tsconfigs. The review then read exactly those 24 files in 30 reads (braid#425, finding 13). The guard from braid#418 answered nothing, rightly: none of its reads was of a pasted file. **Fix.** Order the paste by what a reviewer needs: source before tests, tests before configuration and documentation; a file under a few hundred lines is always pasted; the budget is spent on the long files last, and only a lock file or a generated file is left to a read. Say in the brief, for the files left out, why (too long) and their size, as it does now. **Done when.** On run 182's commit (its worktree is kept), the brief pastes the engine, the server and their tests whole, and a replay of the review step reads under five files. From run 182 (braid#425).
Author
Owner

Shipped in PR #437 (merged 6a8ee372), archived in PR #438 (review-briefs-after-run-182). The code review's brief pastes the files the commit would add in the reviewer's order: source, then tests, then configuration and documentation, every file under 300 lines before any longer one, while a budget of its own (200,000 characters, REVIEW_PASTE_CHARS) lasts; a lock file (package-lock.json, uv.lock, …) or a generated path is listed and never pasted; a file left out says "(N lines, not pasted: too long)".

Evidence: tests/engine/test_code_review_paste.py on a tree shaped like run 182's commit: the engine, the server and their tests are pasted whole, package-lock.json is listed as a lock file, styles.css as too long, the pasted order is source < tests < configuration; with a small budget every short file is pasted and the long ones are listed. ./tools/test.sh green. Not done: the replay of run 182's code review step; the next run's review counts its reads.

**Shipped in PR #437 (merged 6a8ee372), archived in PR #438 (`review-briefs-after-run-182`).** The code review's brief pastes the files the commit would add in the reviewer's order: source, then tests, then configuration and documentation, every file under 300 lines before any longer one, while a budget of its own (200,000 characters, `REVIEW_PASTE_CHARS`) lasts; a lock file (`package-lock.json`, `uv.lock`, …) or a generated path is listed and never pasted; a file left out says "(N lines, not pasted: too long)". Evidence: `tests/engine/test_code_review_paste.py` on a tree shaped like run 182's commit: the engine, the server and their tests are pasted whole, `package-lock.json` is listed as a lock file, `styles.css` as too long, the pasted order is source < tests < configuration; with a small budget every short file is pasted and the long ones are listed. `./tools/test.sh` green. Not done: the replay of run 182's code review step; the next run's review counts its reads.
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#427
No description provided.