Skip to content

fix(roadmap): rerun the group gates after a split #4040

Closed

Description

@dan-petty

Problem

When a group is over the token budget, the planner asks the model to split the groups once (_Planner._fit). The split replaces groups and criteria of the proposal. The model can bring back an old fault with the new groups.

After a split, _settle (stage.py) runs only 5 of the 14 gates of ProposalGate. The 5 are form, paths, search, criteria and creates. A hand-made list of form_problems, path_problems, search_problems, criterion_problems and creates_problems stands in for check_gates.

These gates read the groups and do not run after a split (stage_change.py, stage_move.py):

  • eval-replay (eval_replay_problems): a changed trigger path with no replay task.
  • what-changes (_what_changes_problems): a path in What Changes that no group lists.
  • move-prefix and move-verify (stage_move.py): the moves in the groups.
  • registry (registry_problems): a registry place that no task names.
  • content (_message_file_problems, _duplicate_task_problems, _self_acceptance_problems): the task text of the groups.
  • spec-delta (_needs_no_spec): it reads the paths of the groups.

The gates citation and dependencies read the evidence fields and dependencies. They do not read the groups. They cannot change after a split.

Expected

After a split, judge the new proposal with the same call as the first pass: check_proposal. Pass the same arguments: known, the tree with the new files, requirements, issue_body, probes, overlaps, the search_evidence of the new groups, plan_creates, read_text and registry. Remove the hand-made list of 5 gates.

A gate that does not read the groups or the criteria passed in the first pass on the same input. It passes again. The repeat costs only local reads and no request.

This change stores nothing and adds no setting. It does not type the request. That belongs to the issue #4046.

Acceptance criteria

  • uv run pytest tests/roadmap/stage/test_roadmap_stage_split_gates.py -k 'eval_replay or what_changes or move_prefix or registry' - a scripted split brings back one fault that only one named gate refuses. The four faults are:
    • a trigger path with no replay task;
    • a What Changes path that no group lists;
    • a move with a bad prefix;
    • a missing registry place.
      The planner returns a refusal that names the gate. On the unchanged code, the planner accepts each of the four plans.
  • uv run pytest tests/roadmap/stage/test_roadmap_stage_split_gates.py -k only_one_gate - for each scripted split, check_gates shows problems under exactly one gate name. So each test case proves one gate.
  • ! grep -n 'path_problems(asked.groups' src/devops_cli/roadmap/stage/stage.py - the hand-made list of gates after a split is gone.

Every command above fails on the unchanged code. The pull request cites the fail-to-pass run (devops ci fail-to-pass --base <ref>).

Feasibility

I read these files at origin/main: stage.py (_settle, _fit), stage_change.py (ProposalGate, check_gates, check_proposal and the gate functions) and stage_move.py. I checked which gate functions read proposal.groups or group.changes. The list above is the result. I checked that citation and dependencies do not read them.

I did not run the planner or the tests. A test that finds all 14 names in the gate result passes today, because check_gates always returns every key. So I did not use it as a criterion.

Existing tool considered

check_proposal (stage_change.py). No new tool.

Cost

Build: about 25k tokens and 1.5 h (one call replaces the list; 5 tests). Keep: about 2k tokens per quarter. Fix: about 8k tokens and 0.5 h.

Related

Part of #3027. #3965, #3966, #3970 (gate and plan-check agreement), #3529. Order: after the issue that writes each stage item when done. Both change stage.py.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 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. The bug lets invalid proposals pass after a split, but the split path is a specific flow that triggers only when a group exceeds the token budget.
    • Value: Medium. It restores full gate coverage on the split path, preventing invalid proposals from being accepted.
    • Effort: Low. The change replaces one hand-made list with one existing call and adds five tests, estimated at about 1.5 hours.
    • Related: fix(roadmap): the stage job stops an item whose task group is a few percent over the budget after one split #2838, which asks for a different change. Both items work on the split path in stage.py, but #2838 fixes items that stop when slightly over budget, while the candidate fixes gates that skip after a split.
  3. added
    priority/p2-medium
    on Nov 7, 2026
  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 7, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 8, 2026
  6. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-08 03:31 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