agents: add determine-affected-versions skill#10341
agents: add determine-affected-versions skill#10341rleungx wants to merge 1 commit intotikv:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughNew documentation adds a multi-phase "determine-affected-versions" skill that derives affected PD release lines from a bug issue by resolving candidate versions (may-affects-* and linked fix PRs), finding the bug-introducing change, validating containment, and producing label updates plus an evidence-rich comment. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
0cd419b to
e6b56a9
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (3)
.agents/skills/determine-affected-versions/SKILL.md (3)
16-24: Consider consolidating the redundant gh commands.The first command (lines 16-18) fetches the issue without labels, while the second command (lines 22-24) includes labels. Since the second command provides a superset of the information, you could simplify this section by showing only the comprehensive command with labels.
📝 Streamlined version
-Fetch the issue: - -```bash -gh issue view <issue> --repo tikv/pd --json number,title,url,closedByPullRequestsReferences -``` - -Fetch the issue with labels as well: +Fetch the issue with labels: ```bash gh issue view <issue> --repo tikv/pd --json number,title,url,labels,closedByPullRequestsReferences🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/skills/determine-affected-versions/SKILL.md around lines 16 - 24, Remove the redundant gh command that fetches the issue without labels and keep only the comprehensive command that includes labels (the line with gh issue view <issue> --repo tikv/pd --json number,title,url,labels,closedByPullRequestsReferences); update the surrounding prose to say "Fetch the issue with labels:" (or similar) so the example is not duplicated and delete the earlier block containing gh issue view ... number,title,url,closedByPullRequestsReferences.
186-187: Consider varying sentence structure for better readability.Three consecutive constraint bullets begin with "When", which slightly impacts readability. Consider varying the sentence structure.
✍️ Alternative wording
-- When a candidate version is confirmed affected, replace `may-affects-*` with `affects-*`. -- When a candidate version is confirmed not affected, remove `may-affects-*`. -- When the result is inconclusive, keep `may-affects-*` and state the uncertainty in the comment. +- If a candidate version is confirmed affected, replace `may-affects-*` with `affects-*`. +- Remove `may-affects-*` for versions confirmed not affected. +- For inconclusive results, keep `may-affects-*` and state the uncertainty in the comment.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/skills/determine-affected-versions/SKILL.md around lines 186 - 187, The three consecutive constraint bullets that start with "When" (e.g., "When a candidate version is confirmed not affected, remove `may-affects-*`." and "When the result is inconclusive, keep `may-affects-*` and state the uncertainty in the comment.") should be rephrased to vary sentence openings for readability; change one or more to an imperative or conditional form such as "Remove `may-affects-*` if a candidate version is confirmed not affected." and "If the result is inconclusive, retain `may-affects-*` and explain the uncertainty in the comment." Update the third similar bullet to start differently (e.g., "Retain..." or "If...") so all three don't begin with "When".
81-81: Clarify the placeholder syntax in the gh api example.The
...?...placeholder syntax might be unclear. Consider using more explicit placeholders or providing a concrete example.📝 Clearer placeholder syntax
- - If the branch is not fetched locally, use `gh api repos/tikv/pd/contents/...?...ref=<branch>`. + - If the branch is not fetched locally, use `gh api repos/tikv/pd/contents/<path>?ref=<branch>`.Or provide a concrete example:
- - If the branch is not fetched locally, use `gh api repos/tikv/pd/contents/...?...ref=<branch>`. + - If the branch is not fetched locally, use `gh api repos/tikv/pd/contents/server/config/config.go?ref=release-7.5`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/skills/determine-affected-versions/SKILL.md at line 81, Replace the ambiguous `gh api repos/tikv/pd/contents/...?...ref=<branch>` placeholder in SKILL.md with clearer placeholder syntax or a concrete example; specifically update the sentence that currently contains the string `gh api repos/tikv/pd/contents/...?...ref=<branch>` to use an explicit path and query format such as `gh api repos/tikv/pd/contents/<path>?ref=<branch>` or show a concrete example (e.g., `gh api repos/tikv/pd/contents/go.mod?ref=release-6.0`) so readers understand where to put the file path and branch name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.agents/skills/determine-affected-versions/SKILL.md:
- Around line 16-24: Remove the redundant gh command that fetches the issue
without labels and keep only the comprehensive command that includes labels (the
line with gh issue view <issue> --repo tikv/pd --json
number,title,url,labels,closedByPullRequestsReferences); update the surrounding
prose to say "Fetch the issue with labels:" (or similar) so the example is not
duplicated and delete the earlier block containing gh issue view ...
number,title,url,closedByPullRequestsReferences.
- Around line 186-187: The three consecutive constraint bullets that start with
"When" (e.g., "When a candidate version is confirmed not affected, remove
`may-affects-*`." and "When the result is inconclusive, keep `may-affects-*` and
state the uncertainty in the comment.") should be rephrased to vary sentence
openings for readability; change one or more to an imperative or conditional
form such as "Remove `may-affects-*` if a candidate version is confirmed not
affected." and "If the result is inconclusive, retain `may-affects-*` and
explain the uncertainty in the comment." Update the third similar bullet to
start differently (e.g., "Retain..." or "If...") so all three don't begin with
"When".
- Line 81: Replace the ambiguous `gh api
repos/tikv/pd/contents/...?...ref=<branch>` placeholder in SKILL.md with clearer
placeholder syntax or a concrete example; specifically update the sentence that
currently contains the string `gh api
repos/tikv/pd/contents/...?...ref=<branch>` to use an explicit path and query
format such as `gh api repos/tikv/pd/contents/<path>?ref=<branch>` or show a
concrete example (e.g., `gh api repos/tikv/pd/contents/go.mod?ref=release-6.0`)
so readers understand where to put the file path and branch name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc928b08-3ee7-491c-bcfd-35830d184a61
📒 Files selected for processing (2)
.agents/skills/determine-affected-versions/SKILL.mdAGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
- AGENTS.md
|
An example for #9776: |
|
/retest |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10341 +/- ##
==========================================
- Coverage 78.88% 78.85% -0.03%
==========================================
Files 527 527
Lines 70920 70920
==========================================
- Hits 55944 55924 -20
- Misses 10978 10984 +6
- Partials 3998 4012 +14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Issue Number: ref #10159
What is changed and how does it work?
Check List
Tests
Release note
Summary by CodeRabbit