Add /watch-pr and rename monitor-stack to monitor-prs (#217) - #227
Merged
Conversation
build-and-test: Python test resultsStatus: ✅ Passed Test log |
jodavis
marked this pull request as ready for review
August 31, 2026 20:54
jodavis
approved these changes
Aug 31, 2026
jodavis-claude
force-pushed
the
dev/claude/Issue-217
branch
from
August 31, 2026 21:09
ba0077f to
046ca75
Compare
…leshooter monitor-stack's hard-stop points just reported failure in detail and stopped, forcing whatever spawned it (or the user, in the now-common direct-invocation case from #215) to absorb the raw diagnosis. Every failure that indicates a genuine pipeline bug rather than a usage/precondition issue — a missing feature branch or bottom-of-stack PR, a stack_checkout.py/stack_pr_poll.py/ stack_rebase_continue.py script error, a stack_complete cleanup failure, or a fix-pr/ resolve-rebase-conflict spawn reporting anything other than successful — now dispatches dev-team:troubleshooter with the epic's own context file instead, mirroring the same pattern workflow-orchestrate and concurrent-orchestrate already use for their own pipeline anomalies. This keeps the actual debugging investigation, and any bug it files, out of the calling session's context, and bounds each occurrence to one troubleshooter-applied retry before falling back to a plain hard stop. Step 1's worktree-freshness guard (a documented upstream Claude Code bug, not this plugin's own) and step 2b's own epic-derivation failure (a usage issue) are left as direct hard stops, since neither is something workflow-troubleshoot's fix strategies apply to. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SXkXzYacgX31sUpJ3CqSX4 (cherry picked from commit c9343e42557dbac08a848e880b7c4fa215220c94)
monitor-stack could only ever monitor a whole epic's gh stack, but there are cases (a PR that isn't part of a stack, or a stack you don't want gh stack rebase-conflict handling for) where a lighter-weight, single/multi-PR monitor is what's actually wanted. Renames monitor-stack to monitor-prs and splits it into two modes: stack mode (--work-item-id, the existing gh stack-backed behavior, unchanged) and PR mode (--pr-numbers, new) which polls a fixed list of PR numbers via the new pr_list_poll.py — resolving each to its own task and reacting to review_comment/human_comment/ci_failure exactly as stack mode does, but with no gh stack involvement at all, so no rebase-conflict handling and no worktree bootstrap. Adds /watch-pr as PR mode's manual entry point, mirroring /watch-stack's direct, in-session, no-isolation invocation from #215 (PR mode has no concurrent-orchestrate auto-start path to protect either). Updates every monitor-stack cross-reference in the repo (concurrent-orchestrate, resolve-rebase-conflict, work-with-stacked-prs, workflow-orchestrate, gh_stack.py, the resolve-rebase-conflict fixture, and the living _doc_StackedPRs.md) to monitor-prs; the frozen _spec_StackedPRs.md ADR record is left as the historical account of the original name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012JnNb6Ai3HJ3uZeSdxGxD6
jodavis-claude
force-pushed
the
dev/claude/Issue-217
branch
from
August 31, 2026 21:15
046ca75 to
6efeebf
Compare
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.
Summary
monitor-stackcould only ever monitor a whole epic'sgh stack, but there are cases (a PR that isn't part of a stack, or a stack you don't wantgh stackrebase-conflict handling for) where a lighter-weight, single/multi-PR monitor is what's actually wanted.monitor-stacktomonitor-prsand splits it into two modes: stack mode (--work-item-id, the existinggh stack-backed behavior, unchanged) and PR mode (--pr-numbers, new).pr_list_poll.py, PR mode's counterpart tostack_pr_poll.py: bounded polling over a fixed, explicit list of PR numbers, resolving each to its own task and reacting toreview_comment/human_comment/ci_failureexactly as stack mode does, but with nogh stackinvolvement — no rebase-conflict handling, no worktree bootstrap./watch-pr <PR#> [PR#...]as PR mode's manual entry point, mirroring/watch-stack's direct, in-session, no-isolation invocation from watch-stack should not isolate itself #215 (PR mode has noconcurrent-orchestrateauto-start path to protect either).monitor-stackcross-reference in the repo (concurrent-orchestrate,resolve-rebase-conflict,work-with-stacked-prs,workflow-orchestrate,gh_stack.py, theresolve-rebase-conflictfixture, and the living_doc_StackedPRs.md) tomonitor-prs._spec_StackedPRs.mdADR record is left referring to the originalmonitor-stackname — it's the historical account of that decision, not living documentation.pr_list_poll.pyitself erroring has no single task's context file naturally in hand, so it stays a plain hard stop; afix-prspawn failure already has the relevant task's own context file in hand (needed for the spawn itself), so that one routes through the troubleshooter.python3 -m pytest plugins/dev-team/skills/workflow-orchestrate/scripts— 314 passed (297 existing + 17 new forpr_list_poll.py). Also fixed a hang in a WIP test (fake_head_refproduced an id that never matched the fake detector's expectation, causingpoll()to busy-loop for the full 480smax_secondson the real clock) discovered while finishing this PR.Closes #217