Skip to content

fix(pull-request skill): reply and resolve all threads including non-actionable#3573

Open
PierreBrisorgueil wants to merge 3 commits intomasterfrom
fix/pull-request-skill-resolve-all-threads
Open

fix(pull-request skill): reply and resolve all threads including non-actionable#3573
PierreBrisorgueil wants to merge 3 commits intomasterfrom
fix/pull-request-skill-resolve-all-threads

Conversation

@PierreBrisorgueil
Copy link
Collaborator

@PierreBrisorgueil PierreBrisorgueil commented Feb 24, 2026

Summary

  • What changed: Updated .claude/skills/pull-request/SKILL.md — loop step 6 now requires replying to and resolving all open threads (including non-actionable/informational ones); stop condition updated to zero open threads.
  • Why: Non-actionable threads were being skipped, leaving unresolved threads on PRs after merging. The stop condition "zero actionable comments" allowed PRs to be marked done with open threads still present.
  • Related issues: Closes fix(pull-request skill): reply and resolve all threads including non-actionable #3572

Scope

  • Modules impacted: .claude/skills/pull-request/SKILL.md (skill definition only)
  • Cross-module impact: none
  • Risk level: low

Validation

  • npm run lint
  • npm run test:unit
  • npm run build
  • Manual checks done (if applicable)

Guardrails check

  • No secrets or credentials introduced (.env*, secrets/**, keys, tokens)
  • No risky rename/move of core stack paths
  • Changes remain merge-friendly for downstream projects
  • Tests added or updated when behavior changed

Notes for reviewers

  • Security considerations: none — skill file only, no application code changed.
  • Mergeability considerations: clean skill-only diff, no conflicts expected with downstream merges.
  • Follow-up tasks (optional): Mirror this fix to the Node stack's equivalent pull-request skill if one exists.

Summary by CodeRabbit

  • Documentation
    • Clarified PR monitoring flow to explicitly handle non-actionable unresolved review threads (reply + resolve) and state progression
    • Expanded guidance for informational items and false positives with examples and when a brief reply is expected
    • Updated CI wait/retry semantics and termination: requires two consecutive grace-period passes with zero unresolved threads before stopping, and re-checks pending checks/reset on fixes

…actionable

Informational/false-positive threads must be explicitly replied to and
resolved before the stop condition is met — not silently skipped.

- Loop procedure: add step 6 for non-actionable open threads (reply, resolve)
- Stop condition: zero open threads (not just zero actionable)
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

Updated the pull-request skill doc to replace the single-pass stop condition with a multi-pass loop using a consecutive_zero counter, explicitly require replying to and resolving non-actionable/informational review threads, clarify CI waiting/retry semantics, and require two consecutive grace-pass confirmations before stopping.

Changes

Cohort / File(s) Summary
PR Monitor Skill Documentation
/.claude/skills/pull-request/SKILL.md
Rewrote monitor loop: removed single-step stop, added consecutive_zero multi-pass logic and explicit re-entry; added handling to reply+resolve non-actionable/unresolved threads; expanded 6b informational guidance and CI wait/retry (6a); replaced stop condition with two consecutive grace-pass checks (6f).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Monitor as PR Monitor
  participant GH as GitHub API
  participant CI as Branch Protection / CI

  Monitor->>GH: Fetch review threads & check statuses
  GH-->>Monitor: Return threads (actionable + non-actionable) + CI checks
  alt non-actionable/unresolved exist
    Monitor->>GH: Post brief reply to each non-actionable thread
    Monitor->>GH: Resolve thread via GraphQL
    Monitor-->>Monitor: Increment loop, reset consecutive_zero on fixes
    Monitor->>GH: Re-fetch threads (loop)
  else zero unresolved threads (after grace)
    Monitor->>CI: Re-check branch protection / CI status
    CI-->>Monitor: Return status
    alt passes confirmed for two consecutive polls
      Monitor-->>Monitor: Stop monitor
    else not confirmed
      Monitor-->>Monitor: Continue loop (apply grace/retry)
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Suggested labels

Refactor

Poem

🐰
I hop through threads both small and tall,
I answer gently, then resolve them all.
Two tidy passes, grace in every lap,
I loop until no threads remain on the map.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating the PR skill to reply and resolve all threads, including non-actionable ones.
Description check ✅ Passed The PR description covers all required template sections: Summary (what/why), Scope, Validation, Guardrails, and Notes for reviewers. All critical information is present.
Linked Issues check ✅ Passed The PR fully addresses the objectives from issue #3572: updating step 6 to handle all threads (including non-actionable), changing the stop condition to zero open threads, and ensuring replies are provided even for informational threads.
Out of Scope Changes check ✅ Passed All changes are within scope: only the skill definition file was modified; no application code or unrelated components were altered, matching the stated skill-only change objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/pull-request-skill-resolve-all-threads

Comment @coderabbitai help to get the list of available commands and usage tips.

@PierreBrisorgueil PierreBrisorgueil marked this pull request as ready for review February 24, 2026 12:07
Copilot AI review requested due to automatic review settings February 24, 2026 12:07
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.claude/skills/pull-request/SKILL.md (2)

239-242: ⚠️ Potential issue | 🟡 Minor

Stop condition text contradicts the loop update.

Section 6f still says “zero unresolved actionable threads,” but the loop now stops on “zero open threads.” Please align this stop condition with the new policy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md around lines 239 - 242, Update the
stop-condition wording in the "6f. Stop condition" section: replace the phrase
“zero unresolved actionable threads” with “zero open threads” (or otherwise
mirror the loop's stop condition) so the text matches the new policy; ensure the
paragraph under the "6f. Stop condition" heading and any nearby references use
the exact same term (“zero open threads”) as the loop update.

3-3: ⚠️ Potential issue | 🟡 Minor

Align description with new “zero open threads” stop condition.

Line 3 still says “zero actionable threads,” which conflicts with the updated loop logic. Update the description to “zero open threads” to avoid confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md at line 3, Replace the phrase "zero
actionable threads" with "zero open threads" in the PR lifecycle description so
it matches the updated loop logic; edit the description line in SKILL.md (the
"Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous
monitor loop (fix comments, resolve threads, iterate until CI green and zero
actionable threads)." string) to read "...iterate until CI green and zero open
threads."
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.claude/skills/pull-request/SKILL.md:
- Around line 239-242: Update the stop-condition wording in the "6f. Stop
condition" section: replace the phrase “zero unresolved actionable threads” with
“zero open threads” (or otherwise mirror the loop's stop condition) so the text
matches the new policy; ensure the paragraph under the "6f. Stop condition"
heading and any nearby references use the exact same term (“zero open threads”)
as the loop update.
- Line 3: Replace the phrase "zero actionable threads" with "zero open threads"
in the PR lifecycle description so it matches the updated loop logic; edit the
description line in SKILL.md (the "Full PR lifecycle — branch, commit, issue,
draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads,
iterate until CI green and zero actionable threads)." string) to read
"...iterate until CI green and zero open threads."

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ca1822 and ff776c8.

📒 Files selected for processing (1)
  • .claude/skills/pull-request/SKILL.md

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a workflow issue in the pull-request skill where non-actionable review threads (e.g., informational comments, approvals, false positives) were being skipped instead of replied to and resolved, leaving open threads on merged PRs. The solution updates the autonomous monitor loop to require handling ALL thread types and changes the stop condition from "zero actionable comments" to "zero open threads."

Changes:

  • Added new step 6 in the monitor loop to handle non-actionable threads by replying and resolving them
  • Renumbered the stop condition from step 6 to step 7 and updated it to check for "zero open threads" instead of "zero actionable comments"
  • Updated the "Informational" category definition to clarify that these threads must be replied to and resolved (not skipped)

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.93%. Comparing base (a671a71) to head (18c70f8).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3573   +/-   ##
=======================================
  Coverage   95.93%   95.93%           
=======================================
  Files          20       20           
  Lines         516      516           
  Branches      140      140           
=======================================
  Hits          495      495           
  Misses         21       21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…tency

- Terminology: 'open threads' → 'unresolved threads' throughout loop procedure
- Step 6: add 'all' to match step 5 explicitness (reply all, resolve all)
- Informational section: reformat as bullet list, clarify review threads vs PR-level comments
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.claude/skills/pull-request/SKILL.md (2)

3-3: ⚠️ Potential issue | 🟠 Major

Align summary description with new stop condition (“zero unresolved threads”).

The description still says “zero actionable threads,” which conflicts with the updated loop. Update to “zero unresolved threads” to reflect the new behavior.

Proposed fix
-description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero actionable threads).
+description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero unresolved threads).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md at line 3, Update the description line
in SKILL.md to match the new stop condition by replacing the phrase "zero
actionable threads" with "zero unresolved threads" (edit the value for the
description key shown in the diff); ensure the single-line summary now reads
"...CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate
until CI green and zero unresolved threads)."

244-245: ⚠️ Potential issue | 🟠 Major

Stop condition still references “unresolved actionable” instead of “unresolved.”

Section 6f contradicts the new loop logic by limiting to “unresolved actionable threads.” This can cause the loop to stop while non-actionable unresolved threads remain. Update to “zero unresolved threads.”

Proposed fix
-All CI checks pass **and** a complete polling pass (after the grace period) produces **zero unresolved actionable threads**.
+All CI checks pass **and** a complete polling pass (after the grace period) produces **zero unresolved threads**.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md around lines 244 - 245, Update the stop
condition text in Section 6f to match the loop logic by replacing the phrase
"zero unresolved actionable threads" with "zero unresolved threads" so the stop
condition no longer excludes non-actionable unresolved threads; locate the
Section 6f wording (search for "unresolved actionable threads" or the stop
condition sentence) and change it to explicitly state "zero unresolved threads."
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.claude/skills/pull-request/SKILL.md:
- Line 3: Update the description line in SKILL.md to match the new stop
condition by replacing the phrase "zero actionable threads" with "zero
unresolved threads" (edit the value for the description key shown in the diff);
ensure the single-line summary now reads "...CI, ready, autonomous monitor loop
(fix comments, resolve threads, iterate until CI green and zero unresolved
threads)."
- Around line 244-245: Update the stop condition text in Section 6f to match the
loop logic by replacing the phrase "zero unresolved actionable threads" with
"zero unresolved threads" so the stop condition no longer excludes
non-actionable unresolved threads; locate the Section 6f wording (search for
"unresolved actionable threads" or the stop condition sentence) and change it to
explicitly state "zero unresolved threads."

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff776c8 and 2dd1ce2.

📒 Files selected for processing (1)
  • .claude/skills/pull-request/SKILL.md

…ing review checks

- Loop procedure: add consecutive_zero counter (X=2) — stop only after
  2 consecutive passes with zero unresolved threads, catching slow bots
- Step 4: re-check gh pr checks before reading threads — if any check
  still pending, loop back to grace period (generic, bot-agnostic)
- Stop condition (6f): updated to reflect double-pass requirement
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.claude/skills/pull-request/SKILL.md (2)

205-205: ⚠️ Potential issue | 🟠 Major

Actionable detection can miss carry-over unresolved threads.

The definition on Line 205 scopes “New actionable” to threads not yet replied to in the current pass. An unresolved actionable thread from a prior pass (already replied) can be skipped by both step 6 and step 7. Recommend classifying actionable by unresolved state/content, not reply recency.

Suggested doc fix
-**New actionable** = unresolved review threads not yet replied to in this pass.
+**Actionable in current pass** = all unresolved review threads that require code or test changes, regardless of whether they were replied to in a previous pass.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md at line 205, Update the "New
actionable" definition so it detects any unresolved review threads based on
their unresolved state/content rather than whether they were replied to in the
current pass; change the logic referenced by "New actionable" and the checks in
step 6 and step 7 to evaluate thread.unresolved (or equivalent unresolved
flag/state) and thread content instead of reply recency, ensuring carry-over
unresolved threads from prior passes are classified as actionable.

3-3: ⚠️ Potential issue | 🟡 Minor

Top-level description is now stale vs. loop behavior.

Line 3 still says “zero actionable threads,” but the updated logic requires zero unresolved threads (with two consecutive passes). Please align this line to avoid operator confusion.

Suggested doc fix
-description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero actionable threads).
+description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero unresolved threads).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md at line 3, Update the top-level
description in SKILL.md that currently reads “zero actionable threads” to
reflect the new loop requirement: change the phrase to “zero unresolved threads
(after two consecutive passes)” so it matches the implementation that requires
two consecutive verification passes; locate the exact sentence containing “zero
actionable threads” and replace it with the new wording, keeping punctuation and
tense consistent with the surrounding description.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.claude/skills/pull-request/SKILL.md:
- Line 205: Update the "New actionable" definition so it detects any unresolved
review threads based on their unresolved state/content rather than whether they
were replied to in the current pass; change the logic referenced by "New
actionable" and the checks in step 6 and step 7 to evaluate thread.unresolved
(or equivalent unresolved flag/state) and thread content instead of reply
recency, ensuring carry-over unresolved threads from prior passes are classified
as actionable.
- Line 3: Update the top-level description in SKILL.md that currently reads
“zero actionable threads” to reflect the new loop requirement: change the phrase
to “zero unresolved threads (after two consecutive passes)” so it matches the
implementation that requires two consecutive verification passes; locate the
exact sentence containing “zero actionable threads” and replace it with the new
wording, keeping punctuation and tense consistent with the surrounding
description.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2dd1ce2 and 18c70f8.

📒 Files selected for processing (1)
  • .claude/skills/pull-request/SKILL.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pull-request skill): reply and resolve all threads including non-actionable

2 participants