Skip to content

feat(roadmap): a plan draft of fix-checks gets the stage plan repair #5997

Not planned

Description

@devops-cli-service

Split from #5027.

ADR 0021 section 8 gives the tier 2 repair of a plan draft as the stage plan repair in its change folder. Today the fix-checks step runs the generic model fix in the plan scope, so a plan draft whose check failed gets the wrong repair. This is taken out of #5027 (the launcher), because the launcher can start the Job without it and the repair is a property of the step (#5023, #5971), not of the Job that starts it.

Acceptance criteria:

  • The step fix-checks SHALL run the stage plan repair in the change folder when the pull request is a plan draft, and the generic model fix otherwise.
    Scenario: a plan draft with a failed check.
    WHEN the step runs with --confirm on a bot plan draft whose change folder holds the plan and a check failed
    THEN it repairs the plan in the change folder with the stage planner and its review, and writes no generic code fix.
  • A test SHALL assert the repair kind for a plan draft and for a delivery draft, and SHALL fail when a plan draft takes the generic fix step.

Dependencies

Proposed design

Problem statement

The fix-checks step repairs a plan draft with the generic model fix. ADR 0021 section 8 requires the stage plan repair in the change folder for a plan draft. The step must select the stage plan repair for a bot plan draft. It must keep the generic model fix for a delivery draft.

Acceptance criteria

Requirement: Plan draft repair selection

The fix-checks step SHALL run the stage plan repair for a bot plan draft of type docs(spec).

Scenario: Plan draft with a failed check

  • WHEN The step runs with --confirm on a bot plan draft fixture of type docs(spec) whose change folder holds the plan and a check failed.
  • THEN It runs the stage planner and its review on the plan in the change folder, and it writes no generic code fix.

Requirement: Delivery draft repair selection

The fix-checks step SHALL run the generic model fix when the pull request is no plan draft.

Scenario: Delivery draft with a failed check

  • WHEN The step runs with --confirm on a bot delivery draft fixture whose check failed.
  • THEN It runs the generic model fix, and it runs no stage plan repair.

Requirement: Repair kind test

The test suite MUST assert the repair kind for a plan draft and a delivery draft.

Scenario: Both draft kinds

  • WHEN The test calls the repair-kind selection with a plan draft fixture and a delivery draft fixture.
  • THEN It asserts the stage plan repair for the plan draft and the generic model fix for the delivery draft, and fails on a wrong plan draft kind.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers the internal selection of a repair kind in one roadmap step, so the project builds it in the fix-checks step module. The written cost is about 3,000 tokens and 2 hours to build. It is about 1,000 tokens and 30 minutes for each later fix.

Key questions

  • How does the fix-checks step identify a plan draft?: It uses the type docs(spec) of the bot draft pull request, as CONTEXT.md defines the staging pull request. The step reads that type and adds no new marker. (best practice) [sources: CONTEXT.md]
    • Chosen: The type docs(spec) of the draft pull request. CONTEXT.md defines the staging pull request by this type, and the step already reads the pull request.
    • Rejected: The presence of the change folder on the head branch. A delivery draft holds its change folder until its last commit, so the folder does not separate the two kinds.
    • Rejected: A new label on the plan draft. The type already separates the two kinds, so a label adds a second source of the same fact.
  • Where does the choice of repair kind live?: In the fix-checks roadmap step module. ADR 0021 section 8 makes the repair a property of the step, and the launcher Job can start the step without it. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, CONTEXT.md]
    • Chosen: In the fix-checks step module. ADR 0021 section 8 makes the repair a property of the step, and feat(roadmap): the watch row starts fix-checks Jobs #5027 split out this issue for that reason.
    • Rejected: In the launcher Job. It couples the behavior of the step to the Job, and the launcher needs no such knowledge.
  • What does the stage plan repair do?: It runs the stage planner and its review on the plan in the change folder of the item. It writes no generic code fix. [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
  • How does the test assert the repair kind with no live model call?: Keep the repair-kind choice in one pure function, as the draft-readiness rule does. The test calls that function with a plan draft record and a delivery draft record and asserts the kind. (best practice) [sources: CONTEXT.md]
    • Chosen: One pure function that returns the repair kind. CONTEXT.md gives the draft-readiness decision as one pure function, and a pure function needs no GitHub or model call.
    • Rejected: A full step run against a fake GitHub. It costs more to write, and it tests the plumbing of the step, not the kind choice.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6521

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    on Nov 16, 2026
  2. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 16, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  5. dan-petty commented on Nov 20, 2026

    @dan-petty
    Owner

    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.

  6. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    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.

  7. dan-petty commented on Nov 30, 2026

    @dan-petty
    Owner

    Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.

  8. removed
    status/new
    on Nov 30, 2026
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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions