Skip to content

fix(roadmap): implement takes a plan that needs a fix #4477

Closed

Description

@dan-petty

Problem Description

The implement job takes a Staged item while the draft pull request of its plan holds the label plan/needs-fix. The stage job sets that label when the model review of the plan finds an open finding (_label_needs_fix in src/devops_cli/roadmap/stage/stage.py, constant PLAN_NEEDS_FIX_LABEL in stage_verify.py, #3264). The row stage_ready keeps such a draft a draft. But _Judge._pull_reason in src/devops_cli/roadmap/implement/implement.py accepts every open draft, and no file of src/devops_cli/roadmap/implement/ reads the label. So the Service starts a runner Job on a plan that the review refused, and the Job spends its step budget on a wrong plan.

Evidence from the live Service on 2026-11-10 (label events of the pull requests, and kubectl -n devops get jobs):

Item Plan pull request Label plan/needs-fix set Runner Job started Job end
#3443 #4352 10:51:32Z 10:57:29Z (roadmap implement --item 3443) Failure class limit_reached, stopped 1
#3451 #4353 11:40:27Z 11:47:47Z (roadmap implement --item 3451) Failure class limit_reached, stopped 1

Both Jobs started 6 to 7 minutes after the label, and a person removed the label only at 13:47Z and 14:16Z.

Related, not the same: #4078 and #4041 propose that implement takes no unmerged plan at all, and #3976 proposes that implement reads the check runs of the plan. This item keeps the current Staged design and only reads the label that the review already sets.

Reproduction Steps

  1. Let the stage job open a draft plan pull request whose review gives an open finding, so the draft gets plan/needs-fix.
  2. Let the Service run its row implement, or run devops roadmap implement --item <issue>.
  3. See that the plan takes the item and the Service creates a runner Job.

Expected vs Actual Behavior

Expected: the implement job leaves the item out while its plan pull request holds plan/needs-fix, with a reason that names the label and the pull request. The Service logs the skip once for each label, not in each round. When the label goes away, the job takes the item again.

Actual: the job takes the item, and the runner Job stops on limit_reached.

Environment Diagnostics

  • Execution Environment: Roadmap Service on Kubernetes, row implement, runner Jobs from CronJob devops-cli-runner

Logs, Traces, or Terminal Output

devops-cli-runner-20261110-105724-b626  ["roadmap","implement","--repo","dan-petty/devops-cli","--item","3443","--confirm"]
Failure class limit_reached. Action left: raise_limit.
Took 0 item(s) to a ready pull request, stopped 1.
devops-cli-runner-20261110-114742-c187  ["roadmap","implement","--repo","dan-petty/devops-cli","--item","3451","--confirm"]
Failure class limit_reached. Action left: raise_limit.
Took 0 item(s) to a ready pull request, stopped 1.

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 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. Runner Jobs waste their step budget on refused plans, but the system still functions.
    • Value: Medium. Prevents wasted runner Jobs and failed runs, saving compute and operator time.
    • Effort: Low. The label already exists; the change adds one label check in the implement path.
    • Related: fix(roadmap): implement refuses items with failing plan checks #3976, which asks for a different change. Both stop implement from taking a plan the review refused, but this reads a label while #3976 reads check runs.
  3. added
    priority/p2-medium
    owner/agent
    on Nov 11, 2026
  4. removed
    status/new
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 05:46 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