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

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

Metadata

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

Background and Context

The agents validation attach command in src/cleveragents/cli/commands/validation.py exposes a -p shorthand for the --project option. This shorthand is not documented in the project specification and was not intentionally designed as part of the CLI interface. Undocumented shorthands create confusion for users who may rely on them, only to find them removed or changed without notice, and they violate the Specification-First Development principle (CONTRIBUTING.md) which requires that code only reflect what the specification describes.

Expected Behavior

The --project option on agents validation attach should have no -p shorthand. The option should only be accessible via --project. Running agents validation attach --help should not show a -p shorthand for --project.

The corrected typer.Option definition should be:

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

Acceptance Criteria

  • Running agents validation attach --help does not show -p as a shorthand for --project.
  • Running agents validation attach -p <value> produces a "No such option: -p" error (or equivalent CLI error).
  • Running agents validation attach --project <value> continues to work correctly.
  • No other options on agents validation attach are inadvertently affected.
  • All existing BDD scenarios for agents validation attach continue to pass.
  • A new BDD scenario is added to confirm that -p is rejected as an unknown option.

Subtasks

  • Remove the "-p" shorthand from the typer.Option(...) call for the project parameter in src/cleveragents/cli/commands/validation.py
  • Verify agents validation attach --help no longer lists -p
  • Tests (Behave): Add scenario asserting -p is rejected as an unknown option for agents validation attach
  • Tests (Behave): Confirm existing --project scenarios still pass
  • Run nox (all default sessions), fix any errors
  • Verify coverage ≥ 97% via nox -s coverage_report

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 (fix(cli): remove undocumented -p shorthand from validation attach --project option), 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 (fix/validation-attach-remove-p-shorthand).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Supporting Information

Steps to Reproduce:

  1. Run agents validation attach --help.
  2. Observe that the --project option has a -p shorthand listed.

Actual Behavior:
The --project option has a -p shorthand that is not in the specification.

Proposed Fix:
In src/cleveragents/cli/commands/validation.py, change:

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

to:

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

Automated by CleverAgents Bot
Supervisor: Bug Hunter Pool | Agent: bug-hunter-pool-supervisor
Worker: [BUG-HUNTER-1]


Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(cli): remove undocumented -p shorthand from validation attach --project option` - **Branch**: `fix/validation-attach-remove-p-shorthand` ## Background and Context The `agents validation attach` command in `src/cleveragents/cli/commands/validation.py` exposes a `-p` shorthand for the `--project` option. This shorthand is not documented in the project specification and was not intentionally designed as part of the CLI interface. Undocumented shorthands create confusion for users who may rely on them, only to find them removed or changed without notice, and they violate the Specification-First Development principle (CONTRIBUTING.md) which requires that code only reflect what the specification describes. ## Expected Behavior The `--project` option on `agents validation attach` should have **no** `-p` shorthand. The option should only be accessible via `--project`. Running `agents validation attach --help` should not show a `-p` shorthand for `--project`. The corrected `typer.Option` definition should be: ```python project: Annotated[ str | None, typer.Option("--project", help="Project scope"), ] = None, ``` ## Acceptance Criteria - [ ] Running `agents validation attach --help` does **not** show `-p` as a shorthand for `--project`. - [ ] Running `agents validation attach -p <value>` produces a "No such option: -p" error (or equivalent CLI error). - [ ] Running `agents validation attach --project <value>` continues to work correctly. - [ ] No other options on `agents validation attach` are inadvertently affected. - [ ] All existing BDD scenarios for `agents validation attach` continue to pass. - [ ] A new BDD scenario is added to confirm that `-p` is rejected as an unknown option. ## Subtasks - [ ] Remove the `"-p"` shorthand from the `typer.Option(...)` call for the `project` parameter in `src/cleveragents/cli/commands/validation.py` - [ ] Verify `agents validation attach --help` no longer lists `-p` - [ ] Tests (Behave): Add scenario asserting `-p` is rejected as an unknown option for `agents validation attach` - [ ] Tests (Behave): Confirm existing `--project` scenarios still pass - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## 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 (`fix(cli): remove undocumented -p shorthand from validation attach --project option`), 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 (`fix/validation-attach-remove-p-shorthand`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Supporting Information **Steps to Reproduce:** 1. Run `agents validation attach --help`. 2. Observe that the `--project` option has a `-p` shorthand listed. **Actual Behavior:** The `--project` option has a `-p` shorthand that is not in the specification. **Proposed Fix:** In `src/cleveragents/cli/commands/validation.py`, change: ```python project: Annotated[ str | None, typer.Option("-p", "--project", help="Project scope"), ] = None, ``` to: ```python project: Annotated[ str | None, typer.Option("--project", help="Project scope"), ] = None, ``` --- **Automated by CleverAgents Bot** Supervisor: Bug Hunter Pool | Agent: bug-hunter-pool-supervisor Worker: [BUG-HUNTER-1] --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.2.0 milestone 2026-04-14 16:24:06 +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 fourth report of the same issue. Please track progress on #9359.

Note: This issue is being repeatedly created by automated agents. The root issue (#9359) has already been verified and triaged. The automation system should be configured to check for existing open issues before creating new ones.


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 fourth report of the same issue. Please track progress on #9359. Note: This issue is being repeatedly created by automated agents. The root issue (#9359) has already been verified and triaged. The automation system should be configured to check for existing open issues before creating new ones. --- **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#9383
No description provided.