Skip to content

fix(roadmap): alternatives skips the comments of other jobs #4960

Closed

Description

@dan-petty

Problem Description

The alternatives job sends the comments of other roadmap jobs to its model as person replies. _request in src/devops_cli/roadmap/alternatives.py takes every trusted comment when the job left no comment, else every trusted comment after its own comment. It does not remove a comment that holds a job marker (CONST_ROADMAP_JOB_COMMENT_MARKERS). The intake reason comment is on almost each new item, and its author is the owner account or the Service bot, so it is trusted. A refine, stage or retitle comment after the last alternatives comment also goes to the model on a check again.

Reproduction Steps

  1. Run intake on a new candidate, so it gets the reason comment.
  2. Run devops roadmap alternatives --plan on the item.
  3. Look at replies in the request of the model: it holds the intake reason comment.

Expected vs Actual Behavior

Proposed Solution

  • Remove each comment that holds a marker of CONST_ROADMAP_JOB_COMMENT_MARKERS from the replies of the alternatives request, with the same helper as refine.

Existing Tool Considered

No tool covers the request of this job. Cost to build: about 30,000 tokens and 1 hour.

Acceptance Criteria

  • A test: an item with an intake reason comment and a person reply gives a request whose replies holds only the person reply.
  • A test: a check again after a refine comment does not send the refine comment.

Dependencies

None. #4836 makes the intake comment shorter, but it does not remove it.

Source: #4955

Alternatives check of 2026-11-15: none.
Tool: none found.

Proposed design

Problem statement

The alternatives job sends the comments of other roadmap jobs to its model as person replies. _request in src/devops_cli/roadmap/alternatives.py takes every trusted comment when the job left no comment, and every trusted comment after its own comment otherwise. It does not drop a comment that holds a job marker. The intake reason comment is on almost each new item, and its author is trusted, so the model reads it as a person reply. A refine, stage or retitle comment after the last alternatives comment reaches the model too.

Acceptance criteria

Requirement: Job comments are left out of the replies

The alternatives request SHALL drop each trusted comment that holds a marker of CONST_ROADMAP_JOB_COMMENT_MARKERS from replies.

Scenario: Intake comment and person reply

  • WHEN An item holds an intake reason comment and one person reply, and the alternatives job has left no comment.
  • THEN The request's replies holds only the person reply.

Requirement: A later job comment is left out on a recheck

The alternatives request SHALL drop a trusted job comment that follows the last alternatives comment from replies.

Scenario: Refine comment after a check

  • WHEN A check runs again after a refine comment.
  • THEN The request's replies does not hold the refine comment.

Requirement: A person reply is kept

The alternatives request SHALL keep each trusted comment that holds no job marker in replies.

Scenario: Person reply after a check

  • WHEN A person replies after the last alternatives comment.
  • THEN The request's replies holds the person reply.

Existing Tool Considered

No open, maintained tool or library covers the need. The alternatives check of 2026-11-15 gave the verdict none, and its searches found no filter for job-marker comments. The change builds its own code: about 30,000 tokens and 1 hour to build, keep and fix the filter and its two tests.

Key questions

  • Which trusted comments must the alternatives request drop from replies?: Drop each trusted comment that holds a marker of CONST_ROADMAP_JOB_COMMENT_MARKERS. Keep each other trusted comment. The author type does not tell a job comment from a person reply, because the owner account and the Service bot write both. (best practice) [sources: src/devops_cli/config/constants.py:3894, src/devops_cli/roadmap/refine/refine.py:2118]
  • Where does the job-marker filter live?: Reuse the marker filter that replies_since_refine uses, and call it in _request after the replies_after_marker selection. If refine does not export it, move it to a shared module and call it from both jobs. (best practice) [sources: src/devops_cli/roadmap/alternatives.py, src/devops_cli/roadmap/refine/refine.py:2118]
    • Chosen: Reuse refine's filter. The issue asks for the same helper, and one copy keeps the behavior equal.
    • Rejected: Add a filter in alternatives.py. Two copies drift, and a later change to one leaves the other wrong.
    • Rejected: Make replies_after_marker drop job comments. It answers which comments follow the marker, a different question. The drop belongs to the caller that builds the model request.
  • Does the request drop job comments before or after the reply cap?: Drop the job comments first, then keep the last CONST_ROADMAP_REFINE_MAX_REPLIES person replies. A job comment then cannot push a person reply out of the request. (best practice) [sources: src/devops_cli/roadmap/alternatives.py]
    • Chosen: Drop job comments, then cap. The cap counts person replies only, so a job comment cannot hide a person reply.
    • Rejected: Cap, then drop job comments. A job comment in the last N comments pushes a person reply out of the request.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    on Nov 12, 2026
  2. added
    effort/low
    on Nov 12, 2026
  3. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The defect sends job comments to the model and lowers the quality of the alternatives verdict, but it blocks no user action.
    • Value: Medium. The fix makes the alternatives verdict agree with the refine behaviour and gives the model clean person replies.
    • Effort: Low. The change reuses the helper of refine and adds two tests, with a cost of about one hour.
    • Related: fix(roadmap): repair skips the comments of other jobs #4799, which asks for a different change. Both items stop a roadmap job from reading the comments of other jobs. Item 4799 changes the repair selector and this candidate changes the alternatives model request.
  4. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The model receives wrong context on every check, degrading verdict quality but not breaking the pipeline.
    • Value: Medium. Correct replies improve the accuracy of alternatives verdicts for every new and rechecked item.
    • Effort: Low. The fix reuses the existing refine helper to filter job-marker comments, about one hour of work.
    • Related: fix(roadmap): repair skips the comments of other jobs #4799, which asks for a different change. Both fix a job that reads comments of other jobs, but #4799 fixes repair._newest while the candidate fixes alternatives._request.
  5. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches returned no library or tool for filtering job-marker comments out of GitHub issue replies: the results were unrelated documentation pages about CSS/HTML comments, MDN discussions and speech alternatives, none of which address building a model request from GitHub issue comments. The need is a small change inside the project's own code (reuse refine's existing helper to drop comments holding CONST_ROADMAP_JOB_COMMENT_MARKERS in alternatives._request), which no external tool supplies; the ADRs in force also name no tool for this. The issue itself reaches the same conclusion and no reply rules out a tool.

    Tool: none found

    Lacks:

    • No external tool filters GitHub issue comments by the project's own job-comment markers before a model request
    • Filtering of replies must match refine's replies_since_refine behaviour, which is project-specific code
    • The two regression tests (intake reason comment plus person reply, and a recheck after a refine comment) must be written in the project's suite

    Searches run:

    • library strip bot comments from GitHub issue thread replies, results: 5
    • python filter GitHub issue comments exclude bot and job comments before sending to LLM, results: 5
    • GitHub REST API distinguish bot comments author_association bot user type, results: 5
    • dan-petty devops-cli roadmap alternatives job, results: 5

    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/ready
    and removed
    status/new
    on Nov 16, 2026
  7. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 0cdf3e4 (see proposed design in issue body).

  8. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 17, 2026
  9. removed
    status/in-review
    on Nov 17, 2026
  10. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 19:36 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