Skip to content

fix(roadmap): the stage job refuses a plan whose group reads a path that a later group creates #3017

Closed

Description

@dan-petty

What happened

About 8 of 37 plans order their groups so that the test of group N needs code that only a later group makes: #2975 (the ratchet test breaks between groups 1-7 and 8), #2996, #2997 (group 1 needs code from group 2), #2999, #2857, #2980, #2971 and #2958. The prompt says "write groups in the order of the work" and nothing checks it.

What should happen

check_proposal refuses a plan where group N names, in reads or a task code span, a path that only a later group creates.

Acceptance criteria

Source

An evaluation on 2026-11-01 of the 37 docs(openspec): plan #N pull requests (35 merged, 2 open) found 34 that need fixes and 1 to reject. The per-PR reviews are in the comments of tracker #3005's thread and in .data/agent/scratch/plan-review.json of the owner's workstation. Related: #3005 (the kind of a task group: test for behavior, a repeatable check for other changes).

Proposed design

Problem statement

The stage job must refuse a plan where a group reads a path that only a later group creates. About 8 of 37 recent plans have this ordering defect. The check was implemented in #3010 (archived 2026-11-01) as the function path_problems(groups, tree), which validates that every path in reads, changes, task code spans, and verify either exists at the commit or is created by a group at or before the current one. The remaining work is to confirm the check covers the cases listed in this issue and to add the test cases that name both the reading group and the creating group in the problem text.

Acceptance criteria

Requirement: Refuse forward-read plan

The stage job SHALL refuse a plan where group N names a path in reads or a task code span that only a later group M creates, and the problem text SHALL name both group N and group M.

Scenario: Forward-read plan is refused

  • WHEN A plan has group 1 reading a path that only group 3 creates
  • THEN check_proposal returns a problem that names group 1 and group 3

Requirement: Accept correctly ordered plan

The stage job SHALL accept a plan where every group reads only paths that exist at the commit or are created by an earlier or the same group.

Scenario: Correctly ordered plan passes

  • WHEN A plan has group 1 creating path A and group 2 reading path A
  • THEN check_proposal returns no path problem for that plan

Existing Tool Considered

No open, maintained tool covers this project-specific validation of plan group ordering. The project builds the check in its own check_proposal function. #3010 (archived) already implements path_problems(groups, tree) for this exact rule. The written cost is one small pure function, two test cases, and the maintenance of the validation logic until it matches the plan format. The cost is already paid by #3010.

Key questions

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 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.
    • Value: Medium.
    • Effort: Low.
  3. added
    priority/p2-medium
    on Nov 1, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 1, 2026
  5. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

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

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

    @devops-cli-service
    Contributor

    Staged: branch fix/3017-the-stage-job-refuses-a-plan, draft pull request #3179. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:

    1. Name the creating group in the path problem: 20669 tokens
    2. Write the change folder and its spec delta: 5440 tokens

    The plan run made 9 model request(s), and used 221002 input tokens and 4362 output tokens. The tool calls, in order:

    1. search_code({"text":"path_problems"})
    2. search_code({"text":"def check_proposal"})
    3. read_file({"path":"src/devops_cli/roadmap/stage_paths.py"})
    4. read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py"})
    5. read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py","start_line":90})
    6. read_file({"path":"src/devops_cli/roadmap/stage_paths.py","start_line":80})
    7. search_code({"text":"stage_problem_path"})
    8. search_code({"text":"stage_path_places"})
    9. read_file({"path":"src/devops_cli/lang/en/messages.py","start_line":2770,"end_line":2820})
    10. read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":270,"end_line":320})
    11. read_spec({"capability":"roadmap-stage"})
    12. read_file({"path":"openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/specs/roadmap-stage/spec.md"})
    13. read_spec({"capability":"roadmap-stage","requirement":"The plan names files that exist at the staged commit"})
    14. read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py","start_line":200})
    15. search_code({"text":"def make_stage_proposal"})
  7. removed
    status/ready
    on Nov 2, 2026
  8. added 2 commits that reference this issue on Nov 2, 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/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