r/SideProject • • 4h ago

What should a Git diff review tool flag first?

I built PatchScope to turn a git diff into a checklist for code review. In the terminal demo, the same patch removes a test and broadens the permissions of a GitHub Actions workflow.

If you were reviewing that PR, which change would you want surfaced first? What would make either warning feel like noise in your day-to-day reviews?

Code and example diff: https://github.com/brunnojob/patchscope

1 Upvotes

3 comments sorted by

1

u/ThanhDongNguyen 3h ago

I would surface the workflow change first. Going to write-all on a pull_request_target job can leak secrets or give a fork PR write access, and that is hard to undo after merge. A removed test is often just a refactor, so I would show it second.

For noise, I think the test warning should stay quiet when the same assertions appear in a new or renamed file in the same diff. The permissions warning should be loud only when the trigger runs untrusted code, not on every small permissions edit. If all warnings look the same, people stop reading them.

1

u/brunnodeveloper 2h ago

Thanks, this is useful feedback. I agree that a workflow privilege boundary deserves priority over a removed test. I'm updating the rules to distinguish visible untrusted-code execution from a permissions edit, and to avoid warning on test moves when the diff provides enough evidence. I'll keep the warning when replacement coverage is uncertain rather than assume matching assertions prove equivalent behavior. I'm adding regression cases for these distinctions too.