Skip to content

feat(github): reviewer-aware reply detection for thread resolution and oldest-first pr updates #706

Closed

Description

@dan-petty

Context & Rationale

AGENTS.md:132 requires an in-thread reply before a thread is resolved, and AGENTS.md:240-245 require oldest-first PR processing. Nothing in src/ enforces either. The reply test is len(t.comments) > 1 (commands/pr.py:1226, github/pr_threads.py:312), so a reviewer's own follow-up counts as a reply. --allow-replied-threads then reports no blocker, and --auto-resolve and threads resolve-all (default --only-replied) close the thread. The thread query already fetches each comment's author { login } (github/pr_threads.py:114). threads resolve (commands/pr.py:1747) resolves with no check. update --all iterates _fetch_open_prs (commands/pr.py:1552, loop at 1610) in gh pr list order, which is newest-first. vibes patterns/fifo-pull-request-shepherding.md:77 also demands the fixing SHA in every reply. No devops-cli incident supports that rule yet (see Measured).

Scope & Deliverables

  • Context & Rationale*: AGENTS.md:132 requires an in-thread reply before a thread is resolved, and AGENTS.md:240-245 require oldest-first PR processing. Nothing in src/ enforces either. The reply test is len(t.comments) > 1 (commands/pr.py:1226, github/pr_threads.py:312), so a reviewer's own follow-up counts as a reply. --allow-replied-threads then reports no blocker, and --auto-resolve and threads resolve-all (default --only-replied) close the thread. The thread query already fetches each comment's author { login } (github/pr_threads.py:114). threads resolve (commands/pr.py:1747) resolves with no check. update --all iterates _fetch_open_prs (commands/pr.py:1552, loop at 1610) in gh pr list order, which is newest-first. vibes patterns/fifo-pull-request-shepherding.md:77 also demands the fixing SHA in every reply. No devops-cli incident supports that rule yet (see Measured).
  • Deliverable*: Add one predicate, has_non_opener_reply(thread): some comment after the first has an author login different from the first comment's. Use it at both call sites. Reword lang/en/help.py:678-690 to "a reply from someone other than the thread opener", and add the probe case as a regression test. threads resolve refuses a thread without such a reply unless --without-reply is passed, and MCP pr_thread_resolve exposes that flag. Sort open PRs by ascending number in one helper, so update --all runs oldest-first. In-Flight Work, PR Stagnation & Blocker Radar can reuse that helper. Queue position in check-readiness/wait belongs to that entry, whose body is in v0.2.24 while its matrix row says v0.2.23. Ship this fix separately and first: MCP pr_check_readiness appends the removed --require-ready (ai/mcp/server.py:2280-2281), and the CLI rejects it. Drop the flag, then fix tests/test_fastmcp_contracts.py:519,532 and docs/MCP_TOOLS.md:1138.
  • Constraint*: Do not port the SHA rule yet. A reply's SHA stops pointing at a branch commit after a rebase or force-push, because the rebase rewrites that commit. Agents would then re-reply after every rebase or stop rebasing, and a reasoned decline would need an empty commit. Do not add a readiness blocker either: threads resolved under the old rule would fail open PRs. Revisit both only after a devops-cli thread is seen resolved without a reply.
  • Measured*: A thread whose only follow-up is the reviewer's own "Still not fixed." yields 0 blockers under --allow-replied-threads and is selected by resolve-all --only-replied (uv run python -B replied_probe.py, GitHub stubbed). The last 100 merged PRs (feat(rag): reach Qdrant through the cluster API instead of a port-forward #379-fix(ai): add .claude to gitignore #577) carry 9 review threads. All 9 were opened and self-resolved by CodeQL with no reply (gh api graphql over pullRequests(states:MERGED,last:100){reviewThreads}). gh pr list --state all --limit 5 returned [577,576,575,574,573].
  • Source*: vibes patterns/fifo-pull-request-shepherding.md, vibes patterns/multi-agent-codebase-concurrency.md, vibes observations/systems/06-multi-agent-concurrency-shared-workspace-hazards-and-swarm-coordination.md

Strategic Alignment

  • Milestone: v0.2.24 (Reactive Workstation Command Center, Interactive TUI & Unified Operations Hub)
  • Roadmap Reference: docs/ROADMAP.md

Activity

  1. added this to the v0.2.24 milestone on Sep 28, 2026
  2. added
    type/feature
    scope/github
    priority/p1-high
    on Sep 28, 2026
  3. added a commit that references this issue on Sep 29, 2026
    60133ff
  4. dan-petty commented on Sep 29, 2026

    @dan-petty
    OwnerAuthor

    Closed by #717, merged into release/v0.2.24.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  5. added a commit that references this issue on Oct 1, 2026
    e6ce3db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/githubtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions