[BUG] agents validation attach --project has undocumented -p shorthand not in spec #9405

Closed
opened 2026-04-14 16:51:19 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(cli): remove undocumented -p shorthand from validation attach --project option
  • Branch: bugfix/m3-validation-attach-project-shorthand

Background and Context

The agents validation attach command in src/cleveragents/cli/commands/validation.py defines the --project option with an undocumented -p shorthand alias via typer.Option("--project", "-p", ...). This shorthand is not present in the CLI specification (docs/specification.md) and was never intentionally designed as part of the public interface.

Undocumented shorthands create confusion for users who may rely on them, only to find them removed or changed in a future release. They also create inconsistency with the rest of the CLI surface, where shorthands are deliberately chosen and documented. The -p shorthand conflicts with the principle that all CLI flags must match the specification exactly.

Discovered during automated bug-hunting analysis of the CLI command surface (Bug Hunter Pool — 2026-04-14).

Expected Behavior

The --project option in agents validation attach should have no shorthand alias. Running agents validation attach --help should show only --project without any -p shorthand listed.

The corrected definition should be:

project: Annotated[
    str | None,
    typer.Option("--project", help="Project scope"),
] = None,

Actual Behavior

The --project option currently has a -p shorthand:

project: Annotated[
    str | None,
    typer.Option("--project", "-p", help="Project scope"),
] = None,

Running agents validation attach --help shows -p as a valid shorthand for --project, which is not in the specification.

File: src/cleveragents/cli/commands/validation.py, line 278

Acceptance Criteria

  • The typer.Option definition for project in attach() uses only "--project" with no -p shorthand.
  • Running agents validation attach --help does not show -p as a shorthand for --project.
  • Using -p as a shorthand for --project in agents validation attach results in an error (unrecognized option).
  • All existing tests for agents validation attach continue to pass.
  • A new BDD scenario is added to verify that -p is not accepted as a shorthand.

Subtasks

  • Remove "-p" from typer.Option("--project", "-p", ...) in attach() in src/cleveragents/cli/commands/validation.py
  • Tests (Behave): Add scenario verifying -p shorthand is rejected by agents validation attach
  • Tests (Behave): Verify --project long-form still works correctly
  • Tests (Robot): Add integration test confirming -p is not accepted
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(cli): remove undocumented -p shorthand from validation attach --project option` - **Branch**: `bugfix/m3-validation-attach-project-shorthand` ## Background and Context The `agents validation attach` command in `src/cleveragents/cli/commands/validation.py` defines the `--project` option with an undocumented `-p` shorthand alias via `typer.Option("--project", "-p", ...)`. This shorthand is not present in the CLI specification (`docs/specification.md`) and was never intentionally designed as part of the public interface. Undocumented shorthands create confusion for users who may rely on them, only to find them removed or changed in a future release. They also create inconsistency with the rest of the CLI surface, where shorthands are deliberately chosen and documented. The `-p` shorthand conflicts with the principle that all CLI flags must match the specification exactly. Discovered during automated bug-hunting analysis of the CLI command surface (Bug Hunter Pool — 2026-04-14). ## Expected Behavior The `--project` option in `agents validation attach` should have **no shorthand alias**. Running `agents validation attach --help` should show only `--project` without any `-p` shorthand listed. The corrected definition should be: ```python project: Annotated[ str | None, typer.Option("--project", help="Project scope"), ] = None, ``` ## Actual Behavior The `--project` option currently has a `-p` shorthand: ```python project: Annotated[ str | None, typer.Option("--project", "-p", help="Project scope"), ] = None, ``` Running `agents validation attach --help` shows `-p` as a valid shorthand for `--project`, which is not in the specification. **File:** `src/cleveragents/cli/commands/validation.py`, line 278 ## Acceptance Criteria - [ ] The `typer.Option` definition for `project` in `attach()` uses only `"--project"` with no `-p` shorthand. - [ ] Running `agents validation attach --help` does **not** show `-p` as a shorthand for `--project`. - [ ] Using `-p` as a shorthand for `--project` in `agents validation attach` results in an error (unrecognized option). - [ ] All existing tests for `agents validation attach` continue to pass. - [ ] A new BDD scenario is added to verify that `-p` is not accepted as a shorthand. ## Subtasks - [ ] Remove `"-p"` from `typer.Option("--project", "-p", ...)` in `attach()` in `src/cleveragents/cli/commands/validation.py` - [ ] Tests (Behave): Add scenario verifying `-p` shorthand is rejected by `agents validation attach` - [ ] Tests (Behave): Verify `--project` long-form still works correctly - [ ] Tests (Robot): Add integration test confirming `-p` is not accepted - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 2026-04-14 16:52:55 +00:00
Author
Owner

🔁 Triage: Duplicate [AUTO-OWNR-1]

This is a duplicate of #9359 (same issue: undocumented -p shorthand on agents validation attach --project). This is the sixth report of the same issue. Please track progress on #9359.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

🔁 **Triage: Duplicate** [AUTO-OWNR-1] This is a duplicate of #9359 (same issue: undocumented `-p` shorthand on `agents validation attach --project`). This is the sixth report of the same issue. Please track progress on #9359. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9405
No description provided.