Skip to content

fix(roadmap): stop refusing test paths in base docstrings #4791

Closed

Description

@dan-petty

Problem Description

The stage gate refuses a plan for a test path that the plan did not write. _stale_test_path_problems in src/devops_cli/roadmap/stage/stage_change.py reads the docstrings of each .py file that a group changes, at the staged base commit. It gives stage_problem_missing_test_file for each tests/...py path in these docstrings that names no file of the commit. The plan cannot change the base text, so no repair reply can remove the problem, and the item fails.

Many docstrings name a test path that is an example input or an old location. A scan of origin/main finds 43 such paths in the docstrings of 33 tracked .py files, for example tests/test_x.py in tests/commands/test_ci.py, tests/helper.py in tests/commands/test_test_selection.py, and tests/test_item_grounding.py in tests/commands/test_pr.py.

The gate came with #3999 (2026-11-07). #4498 and #4591 added a same-name hint to the problem. The hint does not help, because the path is in the base docstring and not in the plan: #4401 failed again with the hint at 16:22Z on 2026-11-11.

Measured on 2026-11-11:

Reproduction Steps

  1. Make a plan with one group that changes src/devops_cli/sample.py, and no spec text that names a missing test path.
  2. Give check_proposal a read_text that returns def helper():\n """See tests/test_x.py."""\n for that file, and a tree that does not hold tests/test_x.py.
  3. Read the problems.

Expected vs Actual Behavior

Expected: the plan gets no stage_problem_missing_test_file problem, because the plan names no missing test path. A spec of the plan that names a missing test path is still refused.

Actual: the plan gets "The test path tests/test_x.py names no file of the staged commit", and no repair can remove it.

Environment Diagnostics

  • DevOps CLI: main at 84df338 (release 0.113.0).
  • Requirement: "A test path in a docstring or a spec names a file of the commit" in openspec/specs/roadmap-stage/spec.md.

Logs, Traces, or Terminal Output

stage gate returns: item=#4472 returns=1 result=refused version=0.112.2
The test path `tests/test_item_grounding.py` names no file of the staged commit.

Pre-Submission Checklist

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/high
    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: P1-High. Four of eleven refused stage items fail on this defect, and service job errors recur daily.
    • Value: High. Legitimate plans are blocked with no repair path, so the stage job cannot complete for affected items.
    • Effort: Low. The fix removes or skips the base-docstring read in one function, _stale_test_path_problems.
    • Related: fix(roadmap): name the same-name file of a missing test path #4498, which asks for a different change. Both target stage_problem_missing_test_file, but #4498 adds a hint to the message while this candidate removes the base-docstring scan entirely.
  3. added
    priority/p1-high
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 22:57 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/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions