Skip to content

fix(roadmap): comment when the watch row leaves a green draft #7223

Done

Description

@dan-petty

Problem or Motivation

The watch row leaves a green bot draft with no visible reason. In src/devops_cli/roadmap/watch_row.py, when draft_readiness does not answer READY for a draft whose checks pass, the row records the head and writes one log line ("The watch row leaves ... a draft"). It posts no comment and names no next owner. A person who looks at the pull request sees passed checks and a draft, and cannot know which step is open.

Rule 6 of AGENTS.md (#7217) says that a draft becomes ready when the checks pass and no agent work remains. A draft that stays a draft needs a reason that a reader can see.

Found by the workflow gap analysis of 2026-11-25.

Proposed Solution

Disposition: change the code.

When the row leaves a draft whose checks pass, it posts one marked comment for that head with the answer and the reason of draft_readiness, and the next step. A second round for the same head posts nothing (entry.ready_head already holds the head). A new head replaces the comment.

Proof: a test of the row with a fake store: one comment for a refused green draft, none on the second round.

Existing Tool Considered

None found. The marked comment helpers of the roadmap jobs already exist, so the change adds no new mechanism.

Alternatives check of 2026-11-25: none.
Tool: none found.
Reason: The searches surfaced only generic documentation, no maintained tool that turns a custom draft-readiness answer into one marked per-head pull request comment, so the need is an internal change to watch_row.py using the existing comment helpers.

Lacks:

  • No tool reads draft_readiness and names the open next step
  • No tool keeps one marked comment per head and replaces it
  • No tool stays silent on a second round for the same head

Proposed design

Problem statement

The watch row leaves a green plan draft as a draft when draft_readiness does not answer READY, and writes only a log line. A person sees passed checks and no reason. The change posts one marked comment for the refused head with the answer, the reason and the next step. A second round for the same head posts no comment. A new head replaces the comment.

Acceptance criteria

Requirement: Refused green draft gets a reason comment

When the watch row refuses to mark a plan draft ready, it SHALL post one marked comment that holds the draft_readiness answer, its reason, and the next step.

Scenario: Refused green draft posts a marked reason comment

  • WHEN A plan draft has passing checks and draft_readiness returns an answer other than READY.
  • THEN The row posts one comment with the marker <!-- devops roadmap draft_readiness --> and text that holds the answer, the reason, and a next-step line.

Requirement: Second round on the same head stays silent

The watch row MUST post no second reason comment for a head that it already judged.

Scenario: Second round on the same head posts no comment

  • WHEN The row runs again on the same head and entry.ready_head already holds that head.
  • THEN The fake store receives no draft-readiness comment for that head.

Requirement: New refused head replaces the comment

The watch row SHALL replace the reason comment when a new head of the same draft is refused.

Scenario: New refused head replaces the comment

  • WHEN A new head of the same draft gets a draft_readiness answer other than READY.
  • THEN The row updates the existing marked comment to the new answer, reason, and next step and adds no second marked comment.

Requirement: Ready draft gets no reason comment

The watch row MUST post no draft-readiness comment when draft_readiness answers READY.

Scenario: Ready draft posts no reason comment

  • WHEN A plan draft has passing checks and draft_readiness returns READY.
  • THEN The row marks the draft ready and the fake store receives no draft-readiness comment.

Existing Tool Considered

The alternatives check in the issue body gives verdict none and names no tool. The block lists what no tool covers. The change uses the existing marked comment helper in watch_row.py and adds no new mechanism. The internal change costs about 1,500 tokens and about 30 minutes to build, keep and fix.

Key questions

  • How does the row keep one comment per pull request and replace it when a new head is refused?: Use the existing post helper with one marker, <!-- devops roadmap draft_readiness -->, and no per-head key. Post only when entry.ready_head differs from the head. A new head then edits the same comment in place. (best practice) [sources: src/devops_cli/roadmap/watch_row.py]
    • Chosen: One marker with no per-head key. The conflict comment in watch_row.py uses this form: the marker alone is the key, so a new head edits the comment in place.
    • Rejected: One marker with the head as a key. A per-head key would add a new comment for each head and would not replace the old comment.
    • Rejected: Close and reopen the comment. The existing helper edits in place. A close and reopen adds requests and state.
  • What does the reason comment say?: It gives the draft_readiness answer value, its reason, and one next-step line. The row gets the answer and the reason from draft_readiness and adds the next step. (best practice) [sources: src/devops_cli/roadmap/watch_row.py]
    • Chosen: Answer, reason and next step in one comment. The issue asks for the answer, the reason, and the next step. One comment gives the reader the full state.
    • Rejected: Answer and reason only. The issue also asks for the next step. A reader would still not know what to do.
    • Rejected: Next step only. The answer and reason name why the draft stays a draft. The next step alone hides that evidence.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor
  2. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 25, 2026
  3. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (4)

    Searches run:

    • Probot app comment on pull request draft status reason, results: 5
    • GitHub bot comment on draft pull request when checks pass automation tool, results: 5
    • open source bot posts pull request comment when CI checks green no draft reason, results: 5
    • Danger JS post comment pull request rule when checks pass, results: 5

    Sources:

  4. added
    status/ready
    and removed
    status/new
    on Nov 28, 2026
  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  6. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 29, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 29, 2026
  8. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-29 11:55 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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions