Review repeated changes once instead of re-reading each copy#33
Merged
Conversation
1e4f5b7 to
15542d3
Compare
When the same change repeats across files (a migration applied to N modules, a field added to N definitions, a symbol renamed across callers), the review was re-reading every copy — on a 4-survey, ~9.5k-line ht-json migration it spent ~30 turns re-analyzing each giant file independently and tipped over max_turns. Add a short prompt step: review a repeated change once on one representative file, then confirm the other occurrences are identical (diff the per-file patch hunks against each other) rather than re-reading each, and focus the review on the distinct changes and on any file that deviates from the pattern (the highest-signal finding). This also catches uniformity problems, and applies to any repeat, not just large diffs. The step recommends `diff <(git diff …) <(git diff …)`, so add `diff` to the allow-list — it is read-only, like grep/jq/cat.
15542d3 to
ab017d3
Compare
jaysonv0341
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When the same change repeats across files (a migration applied to N modules, a field added to N definitions, a symbol renamed across callers), the review was re-reading every copy. On a 4-survey, ~9.5k-line ht-json migration (isapp/ht-json#1473) it spent ~30 turns re-analyzing each giant
segments.jsonindependently and tipped overmax_turns.Adds a short prompt step (
## Repeated changes across files): review a repeated change once on one representative file, confirm the other occurrences are identical rather than re-reading each (diff <(git diff … fileA) <(git diff … fileB)), and focus the review on the distinct changes and on any file that deviates from the pattern (the highest-signal finding).Deliberately not tied to diff size — it triggers on "the same change repeats across files," at any size, so uniformity gets checked regardless and the model isn't left to invent a size threshold. It carries two benefits: catches uniformity problems, and reads each repeated change once instead of N times.
The step recommends
diff, sodiffis added to the allow-list — read-only, likegrep/jq/cat.Honest scoping (from simulation): this reliably makes reviews pattern-aware and improves quality, but run-to-run turn variance is larger than the wording's effect, so it's an average/worst-case improvement, not a hard guarantee that the biggest multi-file migrations stay under a given cap. If a repo's bulk migrations keep tipping over, the reliable lever remains that repo's
max_turns(or splitting the PR).Type of Change
Testing Done
Prompt + allow-list change to the shared review workflow; no functional/schema change. Validated the YAML parses. Behavior validated by reproducing the ht-json#1473 review locally: with the step, the review recognizes the uniform 4-survey migration and verifies it via a single byte-identical patch comparison rather than per-file deep-dives.
diffis read-only and re-exposes nothing beyond the existing Read/Grep tools.Checklist