Skip to content

fix(ci): devops ci test accepts a directory, verifies nothing and exits 0 #2868

Description

@dan-petty

Problem

devops ci test <directory> verifies nothing and exits 0.

Evidence

Run uv run devops ci test tests/invariants/. The command prints No source or test files supplied; nothing to verify. and exits 0. The command maps files to tests. It finds no file in a directory, so it runs no test.

Expected

The command expands a directory to its test files, or it exits non-zero with an error that names the directory. A green exit must mean that a test ran.

Found by

The work on #2860. The workflow ci.yml runs uv run pytest tests/invariants for that reason.

Proposed design

Problem statement

The devops ci test command accepts a directory path but does not expand it to the test files within it. It prints a message and exits 0. A green exit gives a false signal that a test ran. The CI workflow ci.yml works around this by calling uv run pytest tests/invariants directly.

Acceptance criteria

Requirement: Directory expansion

When a directory path is supplied, the command SHALL expand it to the test files it contains and run the mapped tests.

Scenario: Directory with test files

  • WHEN A directory containing at least one test file is passed as the argument
  • THEN The command runs the mapped tests for each test file and exits 0

Requirement: Non-zero exit on empty directory

When a directory path is supplied and no test files are found after expansion, the command SHALL exit non-zero with an error message that names the directory.

Scenario: Directory with no test files

  • WHEN A directory containing no test files is passed as the argument
  • THEN The command exits with a non-zero code and the error message contains the directory path

Requirement: Green exit requires a test run

The command SHALL exit 0 only when at least one test ran.

Scenario: No argument supplied

  • WHEN No file or directory argument is supplied
  • THEN The command exits with a non-zero code

Existing Tool Considered

No alternatives check has run. The need is a bug fix in the project's own devops ci test command. The written cost is small: add directory traversal to the existing file-collection logic and add a test. The tokens to build, keep, and fix this code are minimal because it is a few lines of pathlib traversal in an existing function.

Key questions

  • Should the command expand a directory to its test files, or reject a directory argument with a non-zero exit?: Expand the directory to its test files. This matches the behavior of standard test runners such as pytest and go test. The CI workflow ci.yml needs directory support and currently works around the bug by calling pytest directly. (best practice) [sources: .github/workflows/ci.yml]
    • Chosen: Expand directory to test files. Standard behavior for test runners. The CI workflow needs directory support. Removes the need for the pytest workaround in ci.yml.
    • Rejected: Reject directory with non-zero exit. Simpler to implement but keeps the CI workaround. The workflow would still call pytest directly, leaving the command unable to handle the common case.

Open questions

  • What file patterns does the existing command treat as test files when it maps files to tests? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/ci
    status/new
    value/high
    effort/low
    on Oct 31, 2026
  2. dan-petty commented on Oct 31, 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/ci. The (ci) scope of the title gives the scope.
    • Priority: P1-High. A CI command that exits 0 without running any test gives a false green signal.
    • Value: High. A silent no-op in a CI verification tool can mask real failures.
    • Effort: Low. The fix is either to expand a directory to its files or to exit non-zero with an error message.
    • Related: fix(review): a path review of single files runs its criteria from the repository root, not from the file's folder #1038, which asks for a different change. Both fix a devops subcommand that mishandles a directory argument, but #1038 fixes the working directory in 'devops review path' while the candidate fixes file discovery in 'devops ci test'.
  3. added
    priority/p1-high
    on Oct 31, 2026
  4. devops-cli-service commented on Oct 31, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 330e9fa until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What file patterns does the existing command treat as test files when it maps files to tests? (missing verified source)
  5. added
    status/in-review
    and removed
    status/new
    on Oct 31, 2026
  6. removed
    status/in-review
    on Oct 31, 2026
  7. added a commit that references this issue on Oct 31, 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/p1-highscope/cisource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions