Skip to content

fix(roadmap): the fix_plan row judges and logs each plan it leaves out #5414

Closed

Description

@dan-petty

Problem Description

The row fix_plan hides its queue, and a branch stop can block it. This item holds two faults of the same function, select_fix_plan.

  1. In mode plan, the row logs only its first match and writes no mark. So it selects docs(openspec): plan #4472 Size narrowed test workers by collected tests #4917 at each round and never names the other plans. On 2026-11-13 the selection lines at 08:40:46Z and 10:35:04Z name only docs(openspec): plan #4472 Size narrowed test workers by collected tests #4917, but fix(roadmap): a claim release leaves the item In Progress #5118 passed the record rules from 09:45:42Z. No row line ever named docs(openspec): plan #5118 Restore the Status on a claim release #5350 or docs(openspec): plan #5272 Require cuts for shadow and time each decision #5390. The selection line reads like the start of an attempt. It caused a false belief that the row stalled.
  2. A branch stop after the selection is silent and writes no record. This is latent now: all three branches hold only commits of devops-cli-service[bot]. In mode on, a permanent branch stop makes the row select the same plan at each round, so no lower plan gets an attempt.

Cause

  • select_fix_plan returns the first plan that passes (src/devops_cli/roadmap/steps/fix_plan.py:417-439, return at :437). priority_order (src/devops_cli/roadmap/stage/stage.py:752-758) puts the lowest number first in a priority tie. Mode plan writes no fix_plan.at, so the same plan comes first again.
  • _run_fix_plan_adapter (src/devops_cli/roadmap/run.py:686-697) discards FixPlanRun.left.
  • _attempt returns FixPlanLeftOut at fix_plan.py:853-854, before set_marks at :861, and the adapter discards it. ADR 0021 section 8 lists "The branch holds only commits of the App" as a selection rule, but the code checks it only after the selection.

Reproduction Steps

  1. In Loki (namespace devops), find the fix_plan lines of devops-cli in 24 h: each names only docs(openspec): plan #4472 Size narrowed test workers by collected tests #4917.
  2. Run uv run devops roadmap step fix-plan with no --confirm: it prints one plan, and it names no left-out plan after it.

Expected vs Actual Behavior

Expected: in mode plan, the row judges each candidate. It logs one line that names the mode and says that the row starts no attempt, the plan that mode on would take, and one line for each left-out plan with its reason. A branch stop leaves the plan out with a WARNING line, and the row selects the next plan in the same round.

Actual: one line names the first plan. A branch stop writes nothing, and the next round selects the same plan.

Environment Diagnostics

  • DevOps CLI Version: 0.128.0 (origin/main 2daf63a)
  • Execution Environment: roadmap Service in namespace devops, row fix_plan in mode plan

Proposed Fix

  1. Move the branch rules (_branch_reason) into select_fix_plan, as ADR 0021 section 8 says. A branch stop leaves the item out with its reason, and the selection continues to the next candidate.
  2. In mode plan, judge each candidate. Log the mode line, the would-be selection, and each left-out item with its reason. Use the shared left-out log of fix(roadmap): the implement row logs why it leaves out a plan #5216 (log_left_out with a job argument) when it has merged, else the form of stage_left_out.log_left_out (fix(roadmap): stage metric and log give no left-out reason #4521). The line repeats only when the reason of the item changes.
  3. Log a branch stop at WARNING.

Acceptance Criteria

  • uv run pytest tests/roadmap/steps/test_roadmap_fix_plan.py::test_plan_mode_logs_the_selection_and_each_left_out_plan passes: a fake store with 3 plan pull requests in mode plan gives 1 selected line and 2 left-out lines.
  • uv run pytest tests/roadmap/steps/test_roadmap_fix_plan.py::test_a_branch_stop_selects_the_next_plan_in_the_same_round passes: the branch of the first item holds a commit of a person, and the step selects the second item.
  • uv run pytest tests/roadmap/steps/test_roadmap_fix_plan.py::test_a_branch_stop_logs_a_warning passes.
  • uv run devops ci fail-to-pass --base origin/main shows that the three tests fail on the base and pass on the head. The pull request cites the run.
  • Live, after the merge: one round of the row logs one line for each open plan pull request with plan/needs-fix.

Existing Tool Considered

The left-out log of the stage job (#4521), which #5216 moves to a shared module. No library. Cost to build (estimate): 0.4 M tokens and 2 hours elapsed. Keep: none. Fix: about 0.1 M tokens.

Related

#5216 (the same gap in the implement row), #5211, ADR 0021 section 8.

Source: #4843

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 0) does not change this scope. It adds the live proof.

  • Live proof: after the merge and the release, the fix_plan row runs as the App in mode plan. A comment gives the selection lines that name each open plan PR with plan/needs-fix, with the reason for each plan that the row leaves out.

Activity

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

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

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

    @devops-cli-service
    Contributor

    Live since 2026-11-15 01:32 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/mediumpriority/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