TDD: agents validation attach does not reject simultaneous --project and --plan flags #1985

Open
opened 2026-04-03 00:31:00 +00:00 by freemo · 4 comments
Owner

Metadata

  • Branch: tdd/m4-validation-attach-scope-flag-mutex
  • Commit Message: test(cli): add tdd issue-capture test for validation attach scope flag mutual exclusion
  • Milestone: v3.4.0
  • Parent Epic: #357

Background and Context

Per the Bug Fix Workflow in CONTRIBUTING.md, every Type/Bug issue requires a companion Type/Testing TDD issue. This issue captures the failing test that proves the bug exists before the fix is implemented.

The agents validation attach command fails to enforce the mutual exclusion between --project and --plan scope flags. The spec (docs/specification.md lines 9548–9552) states:

At most one scope flag may be provided per invocation.

This TDD issue's sole deliverable is a Behave scenario tagged @tdd_issue, @tdd_issue_1988, and @tdd_expected_fail that captures the buggy behavior — i.e., the command accepts both flags simultaneously without error.

Expected Behavior

The test should assert that invoking agents validation attach with both --project and --plan simultaneously results in a validation error and the command aborts. While the bug is unfixed, the @tdd_expected_fail tag inverts the result so CI passes.

Acceptance Criteria

  • A Behave scenario exists under features/ that invokes agents validation attach with both --project and --plan simultaneously
  • The scenario asserts that the command exits with an error and prints a mutual exclusion error message
  • The scenario is tagged @tdd_issue, @tdd_issue_1988, and @tdd_expected_fail
  • The test passes CI (via @tdd_expected_fail inversion) while the bug is unfixed
  • nox passes with the new test in place

Subtasks

  • Identify or create the appropriate Behave step file under features/steps/ for CLI validation attach scenarios
  • Write the Gherkin scenario asserting mutual exclusion error on simultaneous --project and --plan
  • Tag the scenario with @tdd_issue, @tdd_issue_1988, and @tdd_expected_fail
  • Verify nox -s unit_tests passes (test inverts correctly via @tdd_expected_fail)
  • 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.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `tdd/m4-validation-attach-scope-flag-mutex` - **Commit Message**: `test(cli): add tdd issue-capture test for validation attach scope flag mutual exclusion` - **Milestone**: v3.4.0 - **Parent Epic**: #357 ## Background and Context Per the Bug Fix Workflow in CONTRIBUTING.md, every `Type/Bug` issue requires a companion `Type/Testing` TDD issue. This issue captures the failing test that proves the bug exists before the fix is implemented. The `agents validation attach` command fails to enforce the mutual exclusion between `--project` and `--plan` scope flags. The spec (`docs/specification.md` lines 9548–9552) states: > At most one scope flag may be provided per invocation. This TDD issue's sole deliverable is a Behave scenario tagged `@tdd_issue`, `@tdd_issue_1988`, and `@tdd_expected_fail` that captures the buggy behavior — i.e., the command accepts both flags simultaneously without error. ## Expected Behavior The test should assert that invoking `agents validation attach` with both `--project` and `--plan` simultaneously results in a validation error and the command aborts. While the bug is unfixed, the `@tdd_expected_fail` tag inverts the result so CI passes. ## Acceptance Criteria - [ ] A Behave scenario exists under `features/` that invokes `agents validation attach` with both `--project` and `--plan` simultaneously - [ ] The scenario asserts that the command exits with an error and prints a mutual exclusion error message - [ ] The scenario is tagged `@tdd_issue`, `@tdd_issue_1988`, and `@tdd_expected_fail` - [ ] The test passes CI (via `@tdd_expected_fail` inversion) while the bug is unfixed - [ ] `nox` passes with the new test in place ## Subtasks - [ ] Identify or create the appropriate Behave step file under `features/steps/` for CLI validation attach scenarios - [ ] Write the Gherkin scenario asserting mutual exclusion error on simultaneous `--project` and `--plan` - [ ] Tag the scenario with `@tdd_issue`, `@tdd_issue_1988`, and `@tdd_expected_fail` - [ ] Verify `nox -s unit_tests` passes (test inverts correctly via `@tdd_expected_fail`) - [ ] 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. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.4.0 milestone 2026-04-03 00:32:17 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — This is the mandatory TDD companion for #1988 (spec violation in agents validation attach). Per CONTRIBUTING.md Bug Fix Workflow, the failing test must exist before the fix is implemented.
  • Milestone: v3.4.0 (Decisions + Validation — already assigned, confirmed correct)
  • MoSCoW: Must Have — Required by the Bug Fix Workflow; the fix in #1988 cannot proceed without this TDD test in place first.
  • Parent Epic: #357 (already linked, confirmed correct)

The issue correctly specifies the @tdd_issue, @tdd_issue_1988, and @tdd_expected_fail tagging convention. This must be completed before #1988 is worked on.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — This is the mandatory TDD companion for #1988 (spec violation in `agents validation attach`). Per CONTRIBUTING.md Bug Fix Workflow, the failing test must exist before the fix is implemented. - **Milestone**: v3.4.0 (Decisions + Validation — already assigned, confirmed correct) - **MoSCoW**: Must Have — Required by the Bug Fix Workflow; the fix in #1988 cannot proceed without this TDD test in place first. - **Parent Epic**: #357 (already linked, confirmed correct) The issue correctly specifies the `@tdd_issue`, `@tdd_issue_1988`, and `@tdd_expected_fail` tagging convention. This must be completed before #1988 is worked on. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Automated attempt to transition issue #1985 from State/Unverified to State/Verified failed to apply the label changes via the Forgejo API wrapper in this environment. Current labels remain: State/Unverified, plus MoSCoW/Must have, Priority/Critical, Type/Testing. Precondition checks passed (no Blocked/Paused conditions). Please update the issue labels to reflect: State/Verified (removing State/Unverified). Once updated, the issue should reflect the new state.

Proposed final label set: MoSCoW/Must have, Priority/Critical, State/Verified, Type/Testing.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-state-updater

Automated attempt to transition issue #1985 from State/Unverified to State/Verified failed to apply the label changes via the Forgejo API wrapper in this environment. Current labels remain: State/Unverified, plus MoSCoW/Must have, Priority/Critical, Type/Testing. Precondition checks passed (no Blocked/Paused conditions). Please update the issue labels to reflect: State/Verified (removing State/Unverified). Once updated, the issue should reflect the new state. Proposed final label set: MoSCoW/Must have, Priority/Critical, State/Verified, Type/Testing. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-state-updater
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — TDD companion to #1988; required by the Bug Fix Workflow in CONTRIBUTING.md
  • Milestone: v3.4.0 (Decisions + Validations)
  • MoSCoW: Must Have — the TDD issue-capture test must exist before the fix is implemented per project workflow rules
  • Parent Epic: #357 (Decisions + Validations + Invariants)

This is the test-first half of the #1988 bug fix pair. Dependency link to parent Epic created.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — TDD companion to #1988; required by the Bug Fix Workflow in CONTRIBUTING.md - **Milestone**: v3.4.0 (Decisions + Validations) - **MoSCoW**: Must Have — the TDD issue-capture test must exist before the fix is implemented per project workflow rules - **Parent Epic**: #357 (Decisions + Validations + Invariants) This is the test-first half of the #1988 bug fix pair. Dependency link to parent Epic created. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Milestone Triage Decision: Moved to Backlog (Belongs in Earlier Milestone)

This TDD validation test has been moved out of v3.4.0 during aggressive milestone triage. Basic validation testing belongs in earlier milestones, not in ACMS v1 + Context Scaling.

Reasoning:

  • v3.4.0 focus: ACMS v1 implementation and Context Scaling capabilities
  • This issue: TDD validation test - basic validation testing
  • Impact: Test coverage for validation, not ACMS or context scaling capability

Should be addressed in v3.3.0 alongside validation core functionality and testing.

**Milestone Triage Decision: Moved to Backlog (Belongs in Earlier Milestone)** This TDD validation test has been moved out of v3.4.0 during aggressive milestone triage. Basic validation testing belongs in earlier milestones, not in ACMS v1 + Context Scaling. **Reasoning:** - v3.4.0 focus: ACMS v1 implementation and Context Scaling capabilities - This issue: TDD validation test - basic validation testing - Impact: Test coverage for validation, not ACMS or context scaling capability Should be addressed in v3.3.0 alongside validation core functionality and testing.
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.

Blocks
Reference
cleveragents/cleveragents-core#1985
No description provided.