Skip to content

feat(roadmap): refuse a what_changes item that names no group path #3411

Closed

Description

@dan-petty

Problem or Motivation

The stage job renders the ## Impact section of proposal.md from the paths in the group changes (_impact in src/devops_cli/roadmap/stage_change.py). The model also writes what_changes as free text. Nothing compares the two.

The plan of #3379 for #3373 named src/devops_cli/lang/en/messages.py in What Changes, but no group listed it in changes. The rendered Impact omitted the file, and every gate accepted the plan. A reader of the plan cannot see that the file changes, and the implement step has no group that edits it.

The same gap hides a path that a What Changes item names but no group changes or creates. The check reads the paths of the groups, and not the text of the proposal.

Proposed Solution & Architectural Design

  • Add a check to check_proposal in src/devops_cli/roadmap/stage_change.py that reads each repository path in a code span of a what_changes item, and refuses a path that no group lists in changes or creates.
  • A What Changes item with no path stays accepted, because the item can describe behavior with no file.
  • Add a scenario to the roadmap-stage spec and a case to the stage golden set.
  • The check reads the reply alone, so the replay runs it with no git call.

Target Subsystem

src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_content.py

Existing Tool Considered

No tool checks one text of a reply against its structured fields. The path check of src/devops_cli/roadmap/stage_paths.py covers the group paths and their code spans, so the change extends that rule to the text of the proposal. The cost is about 2k tokens and 30 minutes.

Proposed design

Problem statement

The stage job renders the Impact section of proposal.md from the paths in the task groups. It does not compare the code spans in What Changes with those groups. A plan can name a file in What Changes that no group changes or creates. The rendered Impact then omits the file, and every gate accepts the plan. This change adds a reply-only check that refuses such a plan.

Acceptance criteria

Requirement: Refuse an unlisted What Changes path

The proposal check SHALL return a problem when a repository path in a code span of a What Changes item is in neither the changes nor the creates list of any task group.

Scenario: What Changes names a path that no group lists

  • WHEN A proposal has a What Changes item with the code span src/devops_cli/lang/en/messages.py, and no group lists that path in changes or creates.
  • THEN check_proposal returns a problem that names the unlisted path.

Requirement: Accept a changed What Changes path

The proposal check SHALL accept a repository path in a What Changes code span when a task group lists that path in changes.

Scenario: What Changes names a path that a group changes

  • WHEN A proposal has a What Changes item with the code span src/devops_cli/roadmap/stage_change.py, and a group lists that path in changes.
  • THEN check_proposal returns no problem for that path.

Requirement: Accept a created What Changes path

The proposal check SHALL accept a repository path in a What Changes code span when a task group lists that path in creates.

Scenario: What Changes names a path that a group creates

  • WHEN A proposal has a What Changes item with the code span src/devops_cli/roadmap/new_check.py, and a group lists that path in creates.
  • THEN check_proposal returns no problem for that path.

Requirement: Accept a What Changes item without a path

The proposal check SHALL accept a What Changes item that contains no repository path in a code span.

Scenario: What Changes item describes behavior only

  • WHEN A proposal has a What Changes item with no code span that is a repository path.
  • THEN check_proposal returns no problem for that item.

Requirement: Ignore a non-path code span

The proposal check SHALL ignore a code span in What Changes that is not a repository path.

Scenario: What Changes names a command in a code span

  • WHEN A proposal has a What Changes item with the code span uv run devops ci test.
  • THEN check_proposal returns no problem for that code span.

Requirement: Run the What Changes check without git

The proposal check SHALL compare What Changes paths with the group lists without a git call or a file read.

Scenario: Replay runs the check on a reply only

  • WHEN The replay calls check_proposal with a proposal and no access to a checkout.
  • THEN The replay returns the path problem and makes no git call.

Requirement: Document the What Changes path rule

The roadmap-stage spec SHALL include a scenario that states the What Changes path rule.

Scenario: Roadmap-stage spec covers What Changes paths

  • WHEN A reader opens openspec/specs/roadmap-stage/spec.md.
  • THEN The spec holds a scenario that refuses a What Changes path that no group lists.

Requirement: Add the stage golden case

The stage golden set SHALL include a case where a What Changes item names a path that no group lists.

Scenario: Golden case for an unlisted What Changes path

  • WHEN The stage golden set runs its cases.
  • THEN The new case reports the path problem.

Existing Tool Considered

No alternatives check has run. No open, maintained tool checks the code spans of a free-text plan against its structured task groups. The change extends the existing path rule in src/devops_cli/roadmap/stage_paths.py to what_changes. The written cost is about 2k tokens to build, keep and fix the check, and 30 minutes.

Key questions

  • Where does the What Changes path check run?: Add the check in src/devops_cli/roadmap/stage_change.py and call it from content_problems, so the stage job and the replay run it through check_proposal without a git call. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_run.py, tests/roadmap/test_roadmap_stage_content.py]
    • Chosen: content_problems in stage_change.py. It already judges reply text and runs in both the job and the replay.
    • Rejected: stage_paths.path_problems. It checks paths against the staged tree and needs git state.
    • Rejected: render_change. It writes files and does not run in the replay gate.
  • How does the check find a repository path in a What Changes item?: Extract each code span with the same code-span path rule that stage_paths uses for group texts. Do not add a second path grammar. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_paths.py]
    • Chosen: Reuse the stage_paths code-span rule. It keeps one definition of a repository path and covers the group paths already.
    • Rejected: Add a new regex in stage_change.py. It creates a second path grammar that can drift from the group check.
    • Rejected: Split What Changes on whitespace. It treats commands and prose as paths and refuses valid plans.
  • Which message does the check return?: Add a new entry to RoadmapMessages in src/devops_cli/lang/en/messages.py. The message names the path and says that no group lists it in changes or creates. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: New RoadmapMessages entry. The project keeps user-facing text in the message catalog.
    • Rejected: Reuse stage_problem_path. It speaks of a group, a staged commit and a place, not of What Changes.
    • Rejected: Hard-code the text in stage_change.py. It breaks the message catalog convention.
  • How does the golden set exercise the check?: Add a golden case whose proposal has a What Changes code span for a path that no group lists. The replay expects the path problem. (best practice) [sources: tests/roadmap/test_roadmap_stage_content.py, tests/roadmap/test_roadmap_stage_eval_run.py, src/devops_cli/roadmap/stage_eval_run.py]
    • Chosen: Add the case to the stage golden set. The issue asks for a golden case and the replay already runs check_proposal.
    • Rejected: Add only a unit test. It does not exercise the replay gate that the issue names.
  • Does the replay run check_proposal without a git call?: Yes. stage_eval_run calls check_proposal on the reply and its fixtures, so a reply-only check runs in the replay. [sources: src/devops_cli/roadmap/stage_eval_run.py, src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_eval_run.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    on Nov 4, 2026
  2. added
    status/new
    value/medium
    effort/low
    on Nov 4, 2026
  3. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Priority: P2-Medium. It closes a validation gap that lets inconsistent plans pass all gates, but it does not block a release or expose a security risk.
    • Value: Medium. It prevents a reader from missing a file change and stops the implement step from having no group for a named file.
    • Effort: Low. The body estimates about 2k tokens and 30 minutes of work in one file plus one test.
    • Related: fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010, which asks for a different change. Both add path validation in check_proposal in stage_change.py, but #3010 checks that named paths exist in the repo while the candidate checks that what_changes paths are covered by a group.
  4. added
    priority/p2-medium
    status/ready
    and removed
    status/new
    on Nov 4, 2026
  5. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

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

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

    @devops-cli-service
    Contributor

    Staged: branch feat/3411-refuse-a-what-changes-item-that, draft pull request #3436. 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. Share the code-span path rule of the group texts: 7344 tokens
    2. Refuse an unlisted What Changes path: 30474 tokens
    3. Add the golden case of the unlisted What Changes path: 7345 tokens

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • other at what_changes, last item: The plan names openspec/specs/roadmap-stage/spec.md in a code span, but no group lists it in changes or creates. The new rule would refuse this plan. Evidence: "openspec/specs/roadmap-stage/spec.md gains the scenario of the What Changes path rule, written by openspec archive"
    • other at group 3: The golden cases load from CASES_DIRECTORY as data. Group 3 changes only the eval-run test file and creates no case file, so the golden case has no task. Evidence: "Add a golden case whose proposal names a repository path in What Changes that no group lists, and record the defect that the replay must report for it."

    The plan run made 1 model request(s), and used 75337 input tokens and 4293 output tokens. The model made no tool call.

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  7. added 3 commits that reference this issue on Nov 4, 2026
  8. 1 remaining item

  9. added
    status/planned
    owner/service
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 4, 2026
  10. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Pull request #3586 is ready for review. The checks passed.

    Spend: 182 model requests, 18697920 input tokens, 71979 output tokens.

  11. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261105-030340-834d ended: succeeded.
    Image digest: sha256:65ddae4ab7e02eb61aaf58a2e8842f5e879df79a7609976ab3efbfdef7e4dcfa

    The last lines of its log:

    Tool call: shell, started: other
    Tool call: shell, program other, refused.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: git status --porcelain
    Tool call: shell, program git, ok.
    Tool call: shell, started: git status --short --untracked-files=<masked>
    Tool call: shell, program git, ok.
    Tool call: shell, started: git status
    Tool call: shell, program git, ok.
    Tool call: shell, started: git log --oneline -3
    Tool call: shell, program git, ok.
    Tool call: shell, started: git show --stat HEAD
    Tool call: shell, program git, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/status.json
    Tool call: shell, program cat, ok.
    Tool call: shell, started: tail -c 200 /home/devops/.data/agent/worktrees/w-3411/.pydantic-ai-harness/shell/3ac0318321744e7fa66493f257157823/output.log
    Tool call: shell, program tail, ok.
    ✓ Took 1 item(s) to a ready pull request, stopped 0.
    Elapsed: 55m 57s
    
  12. removed
    owner/service
    on Nov 5, 2026
  13. removed
    status/in-review
    on Nov 5, 2026
  14. devops-cli-service commented on Nov 5, 2026

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

    @devops-cli-service
    Contributor

    Live since 2026-11-05 04:27 UTC

  16. added 2 commits that reference this issue on Nov 8, 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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions