Skip to content

fix(roadmap): a later plan review judges each earlier finding #5409

Closed

Description

@dan-petty

Problem Description

The plan review of stage and of fix-plan does not converge. Each review is a new sample. It does not see the earlier findings or the answer of the planner. The planner fixes the earlier findings, and the next review opens a different finding on text that did not change. Then stage and fix-plan decide on the counts of two independent reviews. One weak new finding is enough to keep plan/needs-fix.

Evidence (2026-11-13):

Cause

  • VerificationInput.payload (src/devops_cli/roadmap/stage/stage_verify.py:213-221) holds only the number, the title, the body, the plan and the files. It holds no earlier finding and no answer of the planner.
  • stage_verify_return (src/devops_cli/lang/en/messages.py:4112-4115) tells the planner to fix each finding "or show with a quote from the inputs that it is no defect". No step reads or judges that answer.
  • repair_round_due (stage_verify.py:316-326) continues only while the last count is lower than the count before it.
  • _decide (src/devops_cli/roadmap/steps/fix_plan.py:545-560) keeps a revision only when len(repaired.open_findings) < len(revision.before). The two counts come from two independent reviews.

Reproduction Steps

  1. Read the stage comments on the plan pull requests of fix(ci): a narrowed ci test runs many slow tests serially #4472, fix(roadmap): a claim release leaves the item In Progress #5118 and fix(roadmap): decision points need cuts for shadow and run in async code #5272, and write down the open count of each round.
  2. Read the result line of Job fix-plan-validate-4917-r2 in Loki (namespace devops).
  3. Read stage_verify.py:213-221: the payload has no key for the earlier findings or the answer of the planner.

Expected vs Actual Behavior

Expected: a later review says for each earlier finding whether it still holds. It opens a new finding only in text that the revision changed. The step keeps a revision that fixes findings of the head and adds no finding in changed text.

Actual: each review starts from zero. A different finding on unchanged text replaces a fixed finding. The count does not go down, so the round stops and the plan keeps plan/needs-fix.

Environment Diagnostics

  • DevOps CLI Version: 0.128.0 (origin/main 2daf63a)
  • Execution Environment: roadmap Service and fix-plan App Jobs in namespace devops

Proposed Fix

  1. From repair round 1, and in fix-plan, the review payload holds earlier: each open finding of the review before (type, where, problem, quote) and the answer of the planner to it.
  2. The reply schema holds one verdict for each earlier finding: holds or gone. The prompt src/devops_cli/ai/tasks/roadmap_stage_verify.md tells the reviewer to open a new finding only in text that the revision changed. The step gets the changed text from a diff of the two plans. A new finding whose quote is not in changed text is advice.
  3. When the answer of the planner rebuts a finding, a decision point (ADR 0020, Jev) judges the rebuttal before the finding counts again. The point starts in mode shadow.
  4. repair_round_due and _decide decide on the findings of the head that the revision fixed (verdict gone) and on new findings in changed text. They do not compare two counts.

#5215 adds a Jev check "does this plan still hold this finding" to fix-plan. If this item ships first, the #5215 point judges only the earlier findings that the review marks holds. The pull request that ships second updates the other.

Acceptance Criteria

Existing Tool Considered

difflib of the Python standard library gives the changed text of the plan. The decision-point registry of ADR 0020 and Jev through pydantic-ai judge the rebuttal. No outside library keeps review state between rounds. Cost to build (estimate): 1.2 M tokens and 4 hours elapsed. Keep: one payload key, about 1 k more input tokens for each review after round 0, and one Jev request of about 2 k tokens for each rebuttal. Fix: about 0.2 M tokens for each wrong verdict rule.

Related

#5215 (fix-plan asks if each finding still holds), #4866 (a repeated finding uses no round), #5211 (the fix-plan repairs), ADR 0021 section 8.

Source: #4843

Activity

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

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  6. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 15:03 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/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions