Skip to content

fix(roadmap): Give read_issue, fix-plan and fix-checks every comment #6189

Open

Description

@dan-petty

Problem

Open points left by #6167 (PR #6182), against the owner rule of 2026-11-17 ("no fancy ignore system or hard character caps that will cause jobs to fail or miss context like alternative checks, service improvement suggestions, failure reasons on previous attempts, etc"):

  • The stage tool read_issue still cuts each comment of another issue to 600 characters (CONST_ROADMAP_STAGE_ISSUE_COMMENT_CHARS) and shows only the last 3 (CONST_ROADMAP_STAGE_ISSUE_COMMENTS). A decision on a dependency or a related item can sit in a cut or an older comment.
  • The fix-plan revision and the fix-checks job get no issue comments. A person's correction or a failure reason of an earlier attempt does not reach them.

Expected behavior

Related

Alternatives check of 2026-12-01: none.
Tool: none found.
Reason: Searches found no open tool that renders issue comments as newest-in-full, an index of older comments and a paged full read. The need is the project's own comment section and read_issue code.

Lacks:

  • No comment form with newest comments whole
  • No index line for each older comment
  • No paged full read of one comment in read_issue
  • No window-aware item comments for the fix jobs

Proposed design

Problem statement

read_issue cuts each comment of another issue to 600 characters and shows only the last 3. The fix-plan revision and the fix-checks job get no item comments. A person decision or a failure reason can sit in a cut or older comment. This change gives read_issue the #6167 comment form: newest comments whole, an index of older comments, and a paged full read. It gives both fix jobs the shared item comments section with the read_comment notice.

Acceptance criteria

Requirement: read_issue comment section

The stage tool read_issue SHALL show the newest comments of another issue whole, one index line for each older comment, and no cut of a comment.

Scenario: Read an issue with five long comments

  • WHEN The test tests/roadmap/stage/test_roadmap_stage_tools.py calls read_issue on an issue with five 5,000-character comments and a tool window that holds two comments.
  • THEN The answer holds the two newest comments whole, one index line for each of the other three with its number and first line, and no comment is cut to 600 characters.

Requirement: Paged full comment read

read_issue SHALL return one comment of another issue whole in pages when the request names its comment number.

Scenario: Read one long comment in pages

  • WHEN The test tests/roadmap/stage/test_roadmap_stage_tools.py calls read_issue with the number of a 5,000-character comment and a page size of 1,000 characters.
  • THEN Each page holds the next part of that comment, the pages join to the whole comment, and no character is missing.

Requirement: Fix-plan revision item comments

The fix-plan revision SHALL receive the item comments in the #6167 form, so a person decision comment reaches it within its window.

Scenario: Person decision comment after plan merge

  • WHEN The test tests/roadmap/implement/test_roadmap_implement_comments.py builds an item with a person decision comment after its plan merged and builds the fix-plan revision input.
  • THEN The revision input holds that comment whole or its index line, and the one-line notice names read_comment when the section does not fit.

Requirement: Fix-checks item comments

The fix-checks job SHALL receive the item comments in the #6167 form, so a failure reason comment reaches it within its window.

Scenario: Failure reason from an earlier attempt

  • WHEN The test tests/roadmap/implement/test_roadmap_implement_comments.py builds an item with a failure reason comment from an earlier attempt and builds the fix-checks job input.
  • THEN The job input holds that comment whole or its index line, and the one-line notice names read_comment when the section does not fit.

Requirement: No fixed comment cut or count

The stage code SHALL use no fixed comment cut and SHALL use no fixed comment count.

Scenario: Limit-class test has no comment limit

  • WHEN The test tests/roadmap/test_roadmap_limit_classes.py reads the limit classes and the source of the stage code.
  • THEN It finds no entry for CONST_ROADMAP_STAGE_ISSUE_COMMENTS or CONST_ROADMAP_STAGE_ISSUE_COMMENT_CHARS, and the source has no use of either name.

Existing Tool Considered

The alternatives check of 2026-11-24 in the issue body returned verdict none and named no tool. The change builds its own code. The written cost is about 20,000 tokens to build, 3,000 tokens per month to keep and fix, and 2 days of elapsed time.

Key questions

  • Which comment form does read_issue use for another issue?: Use the fix(roadmap): Give stage and implement the person comments #6167 form. The newest comments come whole while they fit the room. Each older comment gets one index line. A comment number gives a paged full read. No comment is cut and no fixed count remains. (best practice) [sources: src/devops_cli/roadmap/item_comments.py, src/devops_cli/roadmap/stage/stage_github.py:105, src/devops_cli/roadmap/stage/stage_tools.py:406, tests/roadmap/stage/test_roadmap_stage_github.py]
    • Chosen: Reuse the fix(roadmap): Give stage and implement the person comments #6167 comment section. The stage request and the implement job already use this form, and it meets the owner rule of 2026-11-17.
    • Rejected: Keep the 600-character cut and last-three count. It hides a decision or a failure reason in a cut or older comment.
    • Rejected: Show every comment in full. A long thread can take the tool answer over the window and gives no index.
  • How does read_issue page a comment of another issue?: Add an optional comment number and page size to read_issue. With them, the tool returns that comment in pages. Do not extend read_comment. read_comment reads a comment of the item of the first request. (best practice) [sources: src/devops_cli/roadmap/stage/stage_tools.py:406, src/devops_cli/roadmap/stage/stage_tools.py:432, tests/roadmap/stage/test_roadmap_stage_tools.py]
    • Chosen: Optional comment argument on read_issue. The tool already reads another issue, so it can page that issue's comment with no second scope.
    • Rejected: Extend read_comment with an issue number. read_comment is scoped to the item of the first request, and a second scope makes its contract unclear.
    • Rejected: Return every comment whole in read_issue. A long thread can exceed the tool answer and gives no index.
  • How do the fix-plan revision and the fix-checks job get the item comments?: Both use the shared item comments section of fix(roadmap): Give stage and implement the person comments #6167. The section uses the room that other inputs leave. It shows the newest comments whole and an index of older comments. It adds the one-line notice with read_comment when it does not fit. The fix-checks job reads the comments once for the run. (best practice) [sources: src/devops_cli/roadmap/implement/implement_comments.py, src/devops_cli/roadmap/implement/implement_step.py, src/devops_cli/roadmap/item_comments.py, tests/roadmap/implement/test_roadmap_implement_comments.py]
    • Chosen: Reuse the shared item comments section. It already applies the window, the index and the read_comment notice, and the implement job gives it to each step.
    • Rejected: Pass the raw comments to each step. It gives no window control, no index and no one-line notice.
    • Rejected: Read the comments in each step. It repeats the API read and can differ between steps of one run.
  • Which token budget and room do the fix-plan revision and fix-checks use for the comments?: Reuse CONST_ROADMAP_IMPLEMENT_COMMENTS_MAX_TOKENS and the room that other inputs leave under the model window. The section never takes a step over the window. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/roadmap/implement/implement_step.py, tests/roadmap/implement/test_roadmap_implement_comments.py]
    • Chosen: Reuse the implement comments budget and room. The implement job already applies this budget and the window room to the same item comments.
    • Rejected: Give the comments a fixed 8,000 tokens apart from the window. It can take the step over the window.
    • Rejected: Give the comments no budget. A long thread can take the step over the window.
  • What happens to the two comment-limit constants in src/devops_cli/config/constants.py?: Remove both constants and their uses. Add both names to the REMOVED tuple. Update the limit-class test so it expects no entry for either name. (best practice) [sources: src/devops_cli/config/constants.py:3933, src/devops_cli/config/constants.py:3934, src/devops_cli/roadmap/stage/stage_github.py, src/devops_cli/roadmap/stage/stage_github_snapshot.py, tests/roadmap/test_roadmap_limit_classes.py]
    • Chosen: Remove both constants and their uses. The issue asks for no cut and no fixed count, so no limit remains.
    • Rejected: Keep the constants with a large value. A fixed value still cuts a long thread or stops at a count.
    • Rejected: Keep them as deprecated. An unused limit name invites a later use and fails the limit-class check.
  • Which test shows that a person decision comment on the item reaches the fix-plan revision?: Add a case to tests/roadmap/implement/test_roadmap_implement_comments.py. The case builds an item with a person decision comment after its plan merged. The case asserts that the fix-plan revision input holds that comment whole or its index line. (best practice) [sources: tests/roadmap/implement/test_roadmap_implement_comments.py, src/devops_cli/roadmap/implement/implement_comments.py, src/devops_cli/roadmap/implement/implement_step.py]
    • Chosen: Extend the implement comments test. The file already tests the item comments section and its readers.
    • Rejected: Add a new test file. The existing file already holds the item comments cases.
    • Rejected: Test only the stage read_issue. It does not show that the fix-plan revision gets the comment.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 17, 2026
  2. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 17, 2026
  4. devops-cli-service commented on Nov 18, 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 (10)

    Searches run:

    • GitHub API list issue comments pagination all comments full text library, results: 5
    • LLM agent prompt include full issue comments newest full older index paged read, results: 5
    • gh issue view --comments all comments GitHub CLI, results: 5
    • gidgethub getiter paginated GitHub issue comments, results: 5
    • PyGithub issue comments pagination get_comments, results: 5
    • gidgethub python GitHub API library, results: 5
    • open source tool read GitHub issue comments full text paginate API, results: 5
    • GitHub issue thread comments context for AI coding agent tool, results: 5
    • GitHub MCP server list issue comments pagination full body, results: 5
    • githubkit, results: 5

    Sources:

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

    @devops-cli-service
    Contributor

    Status set to Ready at 4624bc7 (see proposed design in issue body).

  7. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  8. added
    status/new
    and removed
    status/ready
    on Nov 27, 2026
  9. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  10. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  11. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

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

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/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/readytype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions