Repository navigation
pr-review skill: raise classes of problems, not single instances - #7945
andrewnester wants to merge 2 commits into
Conversation
A review raised one layer of the same lock-deletion race per round on #7753: our retry, then the SDK's retry, then a delete landing late, then the same across commands. Each comment was correct and answered within minutes, and the PR grew with every round. The skill now asks for the class and every instance in one comment, for a race's preconditions compared with BASE, and for follow-ups on the same hazard to go into the earlier thread. Co-authored-by: Isaac <no-reply@databricks.com>
There was a problem hiding this comment.
Automated review at c9b76bb. Each finding was verified against the code.
No blocking issues found. 3 non-blocking comment(s) below.
This PR changes the pr-review skill so it raises each class of problem once with every instance named, records a race's preconditions against BASE, and puts follow-ups on the same hazard in the earlier thread. The aim fits the #7753 case, but three of the new sentences conflict with rules elsewhere in the same file: the race judgment-call rule, the BASE instances in step 4, and the thread replies that the output template has no place for. Each one would push a reviewer who follows the skill into contradictory instructions.
| would fall back to Y." | ||
| - Give an out on genuine judgment calls ("or is this not worth it?"), not on | ||
| bugs. | ||
| bugs. A race that needs a fault and a second actor is a judgment call. |
There was a problem hiding this comment.
[nice to have] Lines 113-114 call a race a bug unless BASE has the same exposure, but this line makes any race that needs a fault and a second actor a judgment call. Almost every race fits that description. Take a lock deleted after a timed-out request while another deploy holds it: if the change introduces it, it's a bug by L113, yet this line still adds "or is this not worth it?" to it. Can this be tied to the BASE check instead, e.g. "A race BASE already has is a judgment call"?
There was a problem hiding this comment.
Agreed. It now reads "A race BASE already has is a judgment call", which matches pass 1. Changed in 2591788.
| 4. Raise each class of problem once. Name the mechanism that makes the | ||
| code wrong and look for every instance: the same request retried by | ||
| another layer (our retry, the SDK's), the same race in another function | ||
| or command, the same pattern at BASE. Comment on the first instance and |
There was a problem hiding this comment.
[nice to have] "the same pattern at BASE" tells the reviewer to name pre-existing instances in the comment, while line 100 still says "not on pre-existing issues next to it." Say a PR adds an unguarded retry in one command and the same retry already exists in another command at BASE. Step 4 puts the other command in the comment and line 100 keeps it out. Should this say BASE instances are named only as context for an instance the change adds, and never become an ask of their own?
There was a problem hiding this comment.
Agreed. Step 4 now says to comment on the first instance the change adds, and that an instance only at BASE is context, not an ask of its own. Changed in 2591788.
| ask was not addressed. | ||
| ask was not addressed. If an earlier thread of yours asked for a fix and | ||
| the new code shows the same hazard one layer down, your ask was | ||
| incomplete: reply in that thread with every remaining layer, say which |
There was a problem hiding this comment.
[nice to have] "reply in that thread" doesn't fit section 5. That section says "Print, do not post", and its template only has ### path:LINE inline comments and a review body. The likely result is a new path:LINE comment for the next layer, which is the per-layer thread this step forbids. Can section 5 get a slot for thread replies (e.g. ### reply to <thread URL>), or can this step say where the reply goes in the printed review?
There was a problem hiding this comment.
Right, the skill prints and never posts. The follow-up is now printed under the earlier thread's path:LINE, marked as a reply, so the output template stays as it is. Changed in 2591788.
The automated review found three new sentences at odds with the rest of the file. A race is a judgment call only when BASE already has it, as pass 1 says. An instance that exists only at BASE is context for a comment, not an ask of its own. A follow-up on an earlier thread is printed under that thread's line, since the skill prints and never posts. Co-authored-by: Isaac <no-reply@databricks.com>
Changes
The pr-review skill now raises each class of problem once, with every instance named in one comment. It asks for a race's preconditions compared with BASE, and puts follow-ups on the same hazard into the earlier thread instead of a new one per layer.
Why
On #7753 a review raised one layer of the same lock-deletion race per round, and each comment was answered with a commit within minutes. One comment naming the class would have settled it in one round.
Tests
Skill text only; no code or tests change.
This pull request and its description were written by Isaac.