Skip to content

fix(roadmap): the stage job requires devops ci test verify commands and mirrored test paths #3015

Closed

Description

@dan-petty

What happened

About 14 of 37 plans use uv run pytest <file> as the verify command, and about 6 put new test files at the flat tests/test_x.py path, although docs/TESTING.md says tests mirror the package tree and openspec/config.yaml names uv run devops ci test <path>. The prompt gives tests/test_feature.py as its example, which pulls the model to a flat path. Nothing enforces the form.

What should happen

  • check_proposal refuses a verify command that does not start with uv run devops ci test, uv run devops ci, uv run devops openspec, uv run devops docs or another uv run devops command, and refuses a creates path under tests/ that is not in the mirror directory of the code it tests or in tests/invariants/.
  • The prompt and openspec/config.yaml give a mirrored example path.

Acceptance criteria

  • A uv run pytest verify command is refused with a problem text.
  • A flat new test path is refused.
  • A test fails if the prompt holds a flat example path.

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 accepts verify commands that use uv run pytest and test paths that sit flat under tests/, even though the project convention requires uv run devops ci test and a mirror of the package tree. About 14 of 37 recent plans used the wrong verify command and about 6 used a flat test path. The prompt example and the config example both show a flat path, which pulls the model to the wrong form. Nothing in check_proposal enforces the correct form.

Acceptance criteria

Requirement: verify-command-prefix

check_proposal SHALL refuse a verify command that does not start with uv run devops.

Scenario: pytest verify command is refused

  • WHEN a stage group's verify command is uv run pytest tests/test_feature.py
  • THEN check_proposal returns a problem that names the verify command

Requirement: test-path-mirror

check_proposal SHALL refuse a creates path under tests/ that is not in the mirror directory of the code it tests or in tests/invariants/.

Scenario: flat test path is refused

  • WHEN a stage group creates tests/test_feature.py and changes src/devops_cli/roadmap/stage.py
  • THEN check_proposal returns a problem that names the path and the expected mirror directory

Requirement: prompt-example-mirrored

the stage prompt and openspec/config.yaml SHALL use a mirrored test path as their example.

Scenario: prompt example is a mirrored path

  • WHEN the stage prompt text and the config example are read
  • THEN the example test path is under a subdirectory of tests/ that matches a package under src/devops_cli/

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers the need to validate a stage job's verify command prefix and test path mirror convention. The project extends its own check_proposal function. The written cost is the tokens to implement the prefix check and the path mirror check, to maintain them as the allowed command set or the mirror convention changes, and to fix them when the stage job schema evolves, plus the elapsed time of one focused change.

Key questions

  • What prefix must a verify command start with?: The verify command must start with uv run devops. (best practice) [sources: openspec/config.yaml, docs/TESTING.md]
    • Rejected: Allow only uv run devops ci test. Too narrow. The body names uv run devops ci, uv run devops openspec and uv run devops docs as valid verify commands too.
    • Chosen: Allow any uv run devops prefix. Covers every valid verify command the body names and leaves room for future devops subcommands.
    • Rejected: Allow any uv run prefix. Too broad. It allows uv run pytest, which is the defect this issue fixes.
  • What is the mirror rule for a new test path under tests/?: A test file under tests/ must sit in the directory that mirrors the package of the code it tests, or in tests/invariants/. [sources: docs/TESTING.md]
  • Where does the validation check live?: In check_proposal, which already validates the stage reply and appends problems. (best practice) [sources: openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md]
  • What example path does the prompt and config use?: A mirrored path such as tests/roadmap/test_feature.py. (best practice) [sources: docs/TESTING.md]
    • Rejected: Keep tests/test_feature.py. It is a flat path. The body says it pulls the model to a flat path.
    • Chosen: Use a mirrored path like tests/roadmap/test_feature.py. It matches the convention in docs/TESTING.md and shows the model the expected form.

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/medium
    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. The gap causes repeated bad plans but does not block the pipeline or expose a security risk.
    • Value: Medium. It prevents the model from generating plans with wrong verify commands and flat test paths, reducing rework.
    • Effort: Medium. It needs a check in check_proposal, a prompt update, a config update, and a test for each rule.
    • 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 items add validation in the stage job for plan content, but #3010 checks that named paths exist while this candidate checks command form and path structure.
  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. removed
    status/ready
    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/mediumpriority/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