Skip to content

refactor(github): one pull request verdict for all monitors #5021

Description

@dan-petty

Problem or Motivation

Four monitors read a pull request, with two verdict codes: the Job watch (implement_pull.py:325 _judge and :366 watch_pull, up to 3600 s), the row stage_ready (stage_ready.py:127 with draft_readiness, implement_pull.py:195), the row pr_conflicts (pr_conflicts.py:100) and devops pr monitor (src/devops_cli/github/pr_monitor.py:617). Two wrappers mark a draft ready (implement_pull.py:414 and pr.py). #4927: the CLI monitor reports ready when a poll reads no check. #4838: it stops after one failed read.

Proposed Solution & Architectural Design

steps/watch.py: one pure function verdict(state) gives PENDING, READY, FAILED (check, class), CONFLICT, BEHIND, THREADS, MERGED, CLOSED or HEAD_MOVED. A poll that reads no check is PENDING (#4927). A failed read is read again at the next poll (#4838). Block mode serves devops pr monitor and the implement Job watch. steps/ready.py: draft_readiness and one markPullRequestReadyForReview wrapper; it marks a draft ready only when the head equals the expected head.

CLI devops roadmap step watch and devops roadmap step ready. The stage_ready row, the implement Job (_watch, _ready), devops pr monitor and devops pr ready call them in the same pull request. #4927 and #4838 fold here. #2530 has a plan pull request from the Service (#4980): coordinate, and do not take it over.

Timeouts: request 30 s < one pull request 60 s; block mode polls every 60 s.

Cost: about 1.2M tokens and 1 agent-day.

Target Subsystem

Pull request monitors: src/devops_cli/github/pr_monitor.py, the implement Job watch, the stage_ready row and devops pr ready.

Existing Tool Considered

The GitHub GraphQL statusCheckRollup and REST reads that devops pr monitor uses today. No new tool.

Acceptance Criteria

Dependencies

Source: #5014

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 3) uses this verdict in due_jobs (#5504). The verdict judges only a checked head: a head whose message holds [skip ci] gets no verdict.

  • Live proof: after the merge and the release, devops pr monitor and the watch row read the open devops-cli-service[bot] PRs as the App. A comment gives one verdict for each PR head, the same from each monitor.

Alternatives check of 2026-11-15: not-applicable.
Class: refactor, no search.
Tool: none found.

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/refactor
    scope/github
    status/new
    value/high
    effort/high
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: refactor. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  6. added
    status/in-review
    and removed
    status/new
    on Nov 15, 2026
  7. removed
    status/in-review
    on Nov 15, 2026
  8. added a commit that references this issue on Nov 15, 2026
  9. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  10. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 23:51 UTC

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

    effort/highpriority/p2-mediumscope/githubsource/agenttype/refactorvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions