Fix quality gates and Click 8.2+ compatibility #3773

Open
opened 2026-04-05 23:22:00 +00:00 by freemo · 3 comments
Owner

Summary

This issue tracks fixes for quality gate failures and compatibility updates for Click 8.2+.

Problem

Multiple quality gates were failing:

  1. Unit tests: CliRunner compatibility issue - Click 8.2+ removed the mix_stderr parameter
  2. Linting: 2 import sorting issues and 3 line length violations
  3. Formatting: 38 files needed reformatting
  4. Tests: Ambiguous step definitions preventing test execution

Solution

1. Click 8.2+ Compatibility

  • Removed mix_stderr=False parameter from all CliRunner instantiations (6 files)
  • Click 8.2+ now always keeps stdout and stderr separate by default, which matches our intended behavior

2. Linting Fixes

  • Auto-fixed 2 import sorting issues with ruff
  • Manually fixed 3 line length violations:
    • robot/helper_acms_pipeline.py:412
    • src/cleveragents/domain/repositories/__init__.py:18
    • src/cleveragents/infrastructure/database/repositories.py:1262

3. Formatting

  • Ran ruff format on all 38 files requiring formatting

4. Test Definition Fix

  • Fixed ambiguous step definitions in tool_runtime_steps.py
  • Updated step patterns to avoid conflicts
  • Updated feature files to use non-ambiguous patterns

Quality Gate Status

All targeted quality gates now pass:

  • Lint
  • Format
  • Typecheck (only optional dependency warnings)
  • Security scan

See the associated PR for the complete list of modified files.

## Summary This issue tracks fixes for quality gate failures and compatibility updates for Click 8.2+. ## Problem Multiple quality gates were failing: 1. **Unit tests**: CliRunner compatibility issue - Click 8.2+ removed the `mix_stderr` parameter 2. **Linting**: 2 import sorting issues and 3 line length violations 3. **Formatting**: 38 files needed reformatting 4. **Tests**: Ambiguous step definitions preventing test execution ## Solution ### 1. Click 8.2+ Compatibility - Removed `mix_stderr=False` parameter from all CliRunner instantiations (6 files) - Click 8.2+ now always keeps stdout and stderr separate by default, which matches our intended behavior ### 2. Linting Fixes - Auto-fixed 2 import sorting issues with ruff - Manually fixed 3 line length violations: - `robot/helper_acms_pipeline.py:412` - `src/cleveragents/domain/repositories/__init__.py:18` - `src/cleveragents/infrastructure/database/repositories.py:1262` ### 3. Formatting - Ran `ruff format` on all 38 files requiring formatting ### 4. Test Definition Fix - Fixed ambiguous step definitions in `tool_runtime_steps.py` - Updated step patterns to avoid conflicts - Updated feature files to use non-ambiguous patterns ## Quality Gate Status All targeted quality gates now pass: - ✅ Lint - ✅ Format - ✅ Typecheck (only optional dependency warnings) - ✅ Security scan ## Related Files See the associated PR for the complete list of modified files.
Author
Owner

Label compliance fix applied:

  • Added missing labels: State/Unverified, Type/Bug, Priority/Medium
  • Reason: Issue had no labels at all. Applied defaults per CONTRIBUTING.md. Type/Bug inferred from issue title/body (quality gate failures). Priority/Medium set as default.

Note: PR #3774 (Closes #3773) is open and implements this issue. Once PR #3774 is merged, this issue should be closed and transitioned to State/Completed.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Added missing labels: `State/Unverified`, `Type/Bug`, `Priority/Medium` - Reason: Issue had no labels at all. Applied defaults per CONTRIBUTING.md. `Type/Bug` inferred from issue title/body (quality gate failures). `Priority/Medium` set as default. Note: PR #3774 (`Closes #3773`) is open and implements this issue. Once PR #3774 is merged, this issue should be closed and transitioned to `State/Completed`. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Elevating to High — Quality gate failures block ALL development. No PR can merge while lint, format, and tests are failing. This is the highest-impact issue in the backlog right now.
  • Milestone: Should be assigned to the earliest active milestone — this is a cross-cutting infrastructure fix.
  • Story Points: 3 — M — The fixes are well-identified (Click 8.2+ compat, lint/format, step definition conflicts). Mostly mechanical changes.
  • MoSCoW: Must Have — Quality gates are the foundation of the entire development process. Per CONTRIBUTING.md, all nox stages must pass. Broken quality gates block every other issue and PR.
  • Parent Epic: No obvious parent — this is a cross-cutting infrastructure concern. Recommend linking to a CI/testing Epic if one exists.

Note: This issue should be prioritized above all other work. It directly relates to the session goal of fixing PR #3774 CI failures.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Elevating to High — Quality gate failures block ALL development. No PR can merge while lint, format, and tests are failing. This is the highest-impact issue in the backlog right now. - **Milestone**: Should be assigned to the earliest active milestone — this is a cross-cutting infrastructure fix. - **Story Points**: 3 — M — The fixes are well-identified (Click 8.2+ compat, lint/format, step definition conflicts). Mostly mechanical changes. - **MoSCoW**: Must Have — Quality gates are the foundation of the entire development process. Per CONTRIBUTING.md, all nox stages must pass. Broken quality gates block every other issue and PR. - **Parent Epic**: No obvious parent — this is a cross-cutting infrastructure concern. Recommend linking to a CI/testing Epic if one exists. **Note**: This issue should be prioritized above all other work. It directly relates to the session goal of fixing PR #3774 CI failures. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
HAL9000 self-assigned this 2026-04-08 18:49:14 +00:00
HAL9000 added this to the v3.2.0 milestone 2026-04-08 18:49:14 +00:00
Owner

Issue assigned to @HAL9000 and milestone set to v3.2.0.

Milestone Rationale: Quality gate failures and Click 8.2+ compatibility issues are fundamental infrastructure problems that block CI for all milestones. Assigning to v3.2.0 as the earliest active milestone since this is a cross-cutting infrastructure fix.

Assignment Rationale: Default assignment to HAL9000 to maintain velocity.


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

Issue assigned to @HAL9000 and milestone set to **v3.2.0**. **Milestone Rationale**: Quality gate failures and Click 8.2+ compatibility issues are fundamental infrastructure problems that block CI for all milestones. Assigning to v3.2.0 as the earliest active milestone since this is a cross-cutting infrastructure fix. **Assignment Rationale**: Default assignment to HAL9000 to maintain velocity. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

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