fix(cli): extend agents diagnostics to check all 9 supported providers #3469

Merged
freemo merged 1 commit from fix/diagnostics-provider-coverage into master 2026-04-05 21:19:44 +00:00
Owner

Summary

  • Extends _check_providers() in src/cleveragents/cli/commands/system.py to report diagnostic status for all 9 providers supported by ProviderRegistry
  • Previously only 4 providers were checked (OpenAI, Anthropic, Google, OpenRouter); now all 9 are covered including Azure, Gemini, Cohere, Groq, and Together AI
  • Adds 11 Behave scenarios covering provider presence, OK status when configured, and WARN with env-var recommendation when not configured

Motivation

Users of Groq, Together AI, Cohere, Azure, or Gemini received no diagnostic feedback from agents diagnostics about their provider configuration. The ProviderRegistry supports 9 providers but _check_providers() only checked 4, silently omitting 5 providers.

Changes

src/cleveragents/cli/commands/system.py

Extended provider_checks list in _check_providers() to include:

  • ("azure", "AZURE_OPENAI_API_KEY")
  • ("gemini", "GEMINI_API_KEY")
  • ("cohere", "COHERE_API_KEY")
  • ("groq", "GROQ_API_KEY")
  • ("together", "TOGETHER_API_KEY")

features/diagnostics_provider_coverage.feature (new)

11 Behave scenarios covering:

  • All 9 providers present in results
  • OK status + no recommendation for each newly-added provider when configured
  • WARN status + correct env-var recommendation for each newly-added provider when not configured

features/steps/diagnostics_provider_coverage_steps.py (new)

Step definitions for the new feature file.

Test Results

All 11 new scenarios pass:

1 feature passed, 0 failed, 0 skipped
11 scenarios passed, 0 failed, 0 skipped
62 steps passed, 0 failed, 0 skipped

Lint and typecheck: No violations

Closes #3422


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

## Summary - Extends `_check_providers()` in `src/cleveragents/cli/commands/system.py` to report diagnostic status for all 9 providers supported by `ProviderRegistry` - Previously only 4 providers were checked (OpenAI, Anthropic, Google, OpenRouter); now all 9 are covered including Azure, Gemini, Cohere, Groq, and Together AI - Adds 11 Behave scenarios covering provider presence, OK status when configured, and WARN with env-var recommendation when not configured ## Motivation Users of Groq, Together AI, Cohere, Azure, or Gemini received no diagnostic feedback from `agents diagnostics` about their provider configuration. The `ProviderRegistry` supports 9 providers but `_check_providers()` only checked 4, silently omitting 5 providers. ## Changes ### `src/cleveragents/cli/commands/system.py` Extended `provider_checks` list in `_check_providers()` to include: - `("azure", "AZURE_OPENAI_API_KEY")` - `("gemini", "GEMINI_API_KEY")` - `("cohere", "COHERE_API_KEY")` - `("groq", "GROQ_API_KEY")` - `("together", "TOGETHER_API_KEY")` ### `features/diagnostics_provider_coverage.feature` (new) 11 Behave scenarios covering: - All 9 providers present in results - OK status + no recommendation for each newly-added provider when configured - WARN status + correct env-var recommendation for each newly-added provider when not configured ### `features/steps/diagnostics_provider_coverage_steps.py` (new) Step definitions for the new feature file. ## Test Results All 11 new scenarios pass: ``` 1 feature passed, 0 failed, 0 skipped 11 scenarios passed, 0 failed, 0 skipped 62 steps passed, 0 failed, 0 skipped ``` Lint and typecheck: ✅ No violations Closes #3422 --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo left a comment

Code Review — PR #3469

Focus Areas: specification-compliance, behavior-correctness, test-coverage-quality

Overview

This PR extends _check_providers() in system.py to report diagnostic status for all 9 providers supported by ProviderRegistry (previously only 4 were checked). It adds a new Behave feature file with 11 scenarios and corresponding step definitions. The change is well-scoped and directly addresses issue #3422.


Specification Compliance

Provider list verified against ProviderRegistry: The ProviderType enum in src/cleveragents/providers/registry.py defines 10 types: OPENAI, ANTHROPIC, GOOGLE, AZURE, OPENROUTER, GEMINI, COHERE, GROQ, TOGETHER, and MOCK. The diagnostics now check all 9 non-mock providers, which is correct — MOCK is a test-only provider and should not appear in user-facing diagnostics.

Env var names in recommendations are accurate: The env var strings used in the recommendation messages (e.g., AZURE_OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY) match the standard environment variable names for these providers. Note that these are only used in the user-facing recommendation string, not for actual configuration checking (which correctly delegates to settings.has_provider_configured()).

Commit message format: fix(cli): extend agents diagnostics to check all 9 supported providers — follows Conventional Changelog . Footer includes ISSUES CLOSED: #3422 . PR body includes Closes #3422 .

Behavior Correctness

The code change is minimal and surgical — only the provider_checks list in _check_providers() is extended with 5 new tuples. The iteration logic, status assignment, and recommendation generation are unchanged and already well-tested for the original 4 providers. The new entries follow the exact same (name, env_var) pattern. No risk of regression.

⚠️ Test Coverage Quality

Strengths:

  • 11 scenarios covering all 5 new providers with both OK (configured) and WARN (unconfigured) paths
  • Scenario 1 verifies all 9 providers are present in results (count + name check)
  • Step definitions are well-typed with proper -> None return annotations
  • Assertion messages are descriptive and include actual values for debugging
  • Mock setup correctly patches cleveragents.config.settings.get_settings at the right import path

Concerns:

  1. @coverage_boost tag (features/diagnostics_provider_coverage.feature:1)

    • This tag name is unusual and suggests the tests may be primarily motivated by coverage metrics rather than behavior verification. While the tests do verify meaningful behavior, the tag name undermines confidence. Consider using a more descriptive tag like @diagnostics or @providers.
  2. Mock code placement violation (features/steps/diagnostics_provider_coverage_steps.py:14-30)

    • The _make_settings_mock() helper function creates MagicMock objects directly in the step file. Per CONTRIBUTING.md, all mocking code must be confined to the features/mocks/ directory. This helper should be moved to features/mocks/settings_mock.py (or similar) and imported from there.
  3. Missing tests for existing providers

    • The issue's Definition of Done states: "Behave unit test scenarios cover each of the 9 provider checks (present key, missing key, invalid key where applicable)." The new feature file only tests the 5 newly-added providers. While the original 4 (openai, anthropic, google, openrouter) presumably have coverage elsewhere, the DoD implies all 9 should be covered in this feature file. At minimum, consider adding OK/WARN scenarios for the original 4 providers for completeness, or document that they are covered in an existing feature file.

⚠️ Design Observation (Non-blocking)

Static provider list may drift from registry: The issue's subtask #3 explicitly suggests: "Ensure the extended check list stays in sync with ProviderRegistry (consider deriving it dynamically from the registry)." The current implementation uses a hardcoded list of 9 tuples. If a 10th provider is added to ProviderRegistry, the diagnostics will silently omit it — recreating the exact bug this PR fixes.

A more robust approach would derive the list from ProviderRegistry.PROVIDER_KEY_ATTRS or ProviderType, e.g.:

# Derive from registry to stay in sync
from cleveragents.providers.registry import ProviderType
provider_checks = [
    (pt.value, f"{pt.value.upper()}_API_KEY")
    for pt in ProviderType
    if pt != ProviderType.MOCK
]

This would require mapping provider names to their correct env var names (since Azure uses AZURE_OPENAI_API_KEY, not AZURE_API_KEY), but it would prevent future drift. This is a design improvement for a follow-up issue, not a blocker for this PR.

⚠️ PR Metadata

Check Status
Closing keyword Closes #3422
Milestone Not assigned (issue is backlog, but PR should still have a milestone)
Type/ label Missing — should have Type/Bugfix
CHANGELOG.md Not updated
CONTRIBUTORS.md Not updated (if applicable)

Summary

Criterion Verdict
Specification compliance Correct — all 9 non-mock providers covered
Behavior correctness Minimal, safe change
Test coverage quality ⚠️ Good scenarios but mock placement violates CONTRIBUTING.md
Commit format Conventional Changelog with ISSUES CLOSED footer
PR metadata ⚠️ Missing milestone and Type/ label

Overall: The code change itself is correct and well-tested. The main actionable items are:

  1. Move mock helper to features/mocks/ (CONTRIBUTING.md compliance)
  2. Add milestone and Type/Bugfix label to the PR
  3. Consider renaming @coverage_boost tag to something more descriptive

Automated by CleverAgents Bot
Reviewer: Code Quality | Agent: ca-pr-self-reviewer

## Code Review — PR #3469 **Focus Areas:** specification-compliance, behavior-correctness, test-coverage-quality ### Overview This PR extends `_check_providers()` in `system.py` to report diagnostic status for all 9 providers supported by `ProviderRegistry` (previously only 4 were checked). It adds a new Behave feature file with 11 scenarios and corresponding step definitions. The change is well-scoped and directly addresses issue #3422. --- ### ✅ Specification Compliance **Provider list verified against `ProviderRegistry`:** The `ProviderType` enum in `src/cleveragents/providers/registry.py` defines 10 types: `OPENAI`, `ANTHROPIC`, `GOOGLE`, `AZURE`, `OPENROUTER`, `GEMINI`, `COHERE`, `GROQ`, `TOGETHER`, and `MOCK`. The diagnostics now check all 9 non-mock providers, which is correct — `MOCK` is a test-only provider and should not appear in user-facing diagnostics. **Env var names in recommendations are accurate:** The env var strings used in the recommendation messages (e.g., `AZURE_OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY`) match the standard environment variable names for these providers. Note that these are only used in the user-facing recommendation string, not for actual configuration checking (which correctly delegates to `settings.has_provider_configured()`). **Commit message format:** `fix(cli): extend agents diagnostics to check all 9 supported providers` — follows Conventional Changelog ✅. Footer includes `ISSUES CLOSED: #3422` ✅. PR body includes `Closes #3422` ✅. ### ✅ Behavior Correctness The code change is minimal and surgical — only the `provider_checks` list in `_check_providers()` is extended with 5 new tuples. The iteration logic, status assignment, and recommendation generation are unchanged and already well-tested for the original 4 providers. The new entries follow the exact same `(name, env_var)` pattern. No risk of regression. ### ⚠️ Test Coverage Quality **Strengths:** - 11 scenarios covering all 5 new providers with both OK (configured) and WARN (unconfigured) paths - Scenario 1 verifies all 9 providers are present in results (count + name check) - Step definitions are well-typed with proper `-> None` return annotations - Assertion messages are descriptive and include actual values for debugging - Mock setup correctly patches `cleveragents.config.settings.get_settings` at the right import path **Concerns:** 1. **`@coverage_boost` tag** (`features/diagnostics_provider_coverage.feature:1`) - This tag name is unusual and suggests the tests may be primarily motivated by coverage metrics rather than behavior verification. While the tests *do* verify meaningful behavior, the tag name undermines confidence. Consider using a more descriptive tag like `@diagnostics` or `@providers`. 2. **Mock code placement violation** (`features/steps/diagnostics_provider_coverage_steps.py:14-30`) - The `_make_settings_mock()` helper function creates `MagicMock` objects directly in the step file. Per CONTRIBUTING.md, all mocking code must be confined to the `features/mocks/` directory. This helper should be moved to `features/mocks/settings_mock.py` (or similar) and imported from there. 3. **Missing tests for existing providers** - The issue's Definition of Done states: *"Behave unit test scenarios cover each of the 9 provider checks (present key, missing key, invalid key where applicable)."* The new feature file only tests the 5 newly-added providers. While the original 4 (openai, anthropic, google, openrouter) presumably have coverage elsewhere, the DoD implies all 9 should be covered in this feature file. At minimum, consider adding OK/WARN scenarios for the original 4 providers for completeness, or document that they are covered in an existing feature file. ### ⚠️ Design Observation (Non-blocking) **Static provider list may drift from registry:** The issue's subtask #3 explicitly suggests: *"Ensure the extended check list stays in sync with ProviderRegistry (consider deriving it dynamically from the registry)."* The current implementation uses a hardcoded list of 9 tuples. If a 10th provider is added to `ProviderRegistry`, the diagnostics will silently omit it — recreating the exact bug this PR fixes. A more robust approach would derive the list from `ProviderRegistry.PROVIDER_KEY_ATTRS` or `ProviderType`, e.g.: ```python # Derive from registry to stay in sync from cleveragents.providers.registry import ProviderType provider_checks = [ (pt.value, f"{pt.value.upper()}_API_KEY") for pt in ProviderType if pt != ProviderType.MOCK ] ``` This would require mapping provider names to their correct env var names (since Azure uses `AZURE_OPENAI_API_KEY`, not `AZURE_API_KEY`), but it would prevent future drift. This is a design improvement for a follow-up issue, not a blocker for this PR. ### ⚠️ PR Metadata | Check | Status | |-------|--------| | Closing keyword | ✅ `Closes #3422` | | Milestone | ❌ Not assigned (issue is backlog, but PR should still have a milestone) | | `Type/` label | ❌ Missing — should have `Type/Bugfix` | | CHANGELOG.md | ❌ Not updated | | CONTRIBUTORS.md | ❌ Not updated (if applicable) | ### Summary | Criterion | Verdict | |-----------|---------| | Specification compliance | ✅ Correct — all 9 non-mock providers covered | | Behavior correctness | ✅ Minimal, safe change | | Test coverage quality | ⚠️ Good scenarios but mock placement violates CONTRIBUTING.md | | Commit format | ✅ Conventional Changelog with ISSUES CLOSED footer | | PR metadata | ⚠️ Missing milestone and Type/ label | **Overall:** The code change itself is correct and well-tested. The main actionable items are: 1. **Move mock helper to `features/mocks/`** (CONTRIBUTING.md compliance) 2. **Add milestone and `Type/Bugfix` label** to the PR 3. **Consider renaming `@coverage_boost` tag** to something more descriptive --- **Automated by CleverAgents Bot** Reviewer: Code Quality | Agent: ca-pr-self-reviewer
Author
Owner

Independent Code Review — PR #3469

Review Focus: error-handling-patterns, edge-cases, boundary-conditions
Review Reason: initial-review
Recommendation: REQUEST CHANGES


Overview

This PR extends _check_providers() to cover all 9 non-mock providers supported by ProviderRegistry. The production code change is minimal and correct — only the provider_checks list is extended with 5 new tuples following the identical pattern of the existing 4. However, there is one required change related to CONTRIBUTING.md compliance, and several observations from the error-handling/edge-case deep dive.


Required Changes

1. [CONTRIBUTING] Mock code must reside in features/mocks/ directory

  • Location: features/steps/diagnostics_provider_coverage_steps.py, lines 14–30
  • Issue: The _make_settings_mock() helper function creates MagicMock objects directly in the step definitions file. Per CONTRIBUTING.md, all mocking code, test doubles, and mock implementations must be placed exclusively in the features/mocks/ directory.
  • Required: Move _make_settings_mock() to a file such as features/mocks/settings_mock.py and import it from the step definitions.
  • Reference: CONTRIBUTING.md — "All mocking code, test doubles, and mock implementations must be placed exclusively in the features/mocks/ directory and are only permitted in unit tests."

2. [METADATA] PR is missing required Type/ label

  • Issue: CONTRIBUTING.md requires every PR to have exactly one Type/ label. This PR has none.
  • Required: Add Type/Bug label (matching issue #3422's Type/Bug label).
  • Reference: CONTRIBUTING.md — "Every PR must have exactly one Type/ label."

Deep Dive: Error Handling Patterns

Given special attention to error handling, edge cases, and boundary conditions:

Error path analysis — no new risk introduced

The production code change adds 5 new (provider_name, env_var) tuples to a static list. The iteration logic, settings.has_provider_configured() call, status assignment, and recommendation generation are all unchanged. Each new entry follows the exact same code path as the existing 4 entries. No new error paths are introduced.

capitalize() boundary check — all new names produce correct output

Verified that str.capitalize() produces correct display names for all new providers:

  • "azure""Azure" | "gemini""Gemini" | "cohere""Cohere" | "groq""Groq" | "together""Together"

Provider count boundary — correctly excludes MOCK

ProviderType enum defines 10 values (including MOCK). The diagnostics checks exactly 9 (all non-mock providers). The test correctly asserts exactly 9 entries. This is the right boundary.

⚠️ Pre-existing: _check_providers() lacks exception resilience (non-blocking)

Unlike other diagnostic check functions (_check_stale_locks(), _check_async_worker_health(), _check_error_patterns()) which wrap their logic in try/except blocks, _check_providers() has no exception handling. If settings.has_provider_configured() raises for any reason, the entire build_diagnostics_data() call fails — taking down all other diagnostic checks with it.

This PR extends the surface area from 4 to 9 has_provider_configured() calls. While this is a pre-existing design issue (not introduced by this PR), it's worth noting as a follow-up improvement. A defensive wrapper per-provider would make the diagnostics more resilient:

for provider_name, env_var in provider_checks:
    try:
        configured = settings.has_provider_configured(provider_name)
    except Exception:
        configured = False
    # ... rest of logic

Non-blocking — the existing 4 providers have been running without issues.

⚠️ Pre-existing: Static list may drift from ProviderRegistry (non-blocking)

The provider_checks list is hardcoded. If a new provider is added to ProviderType in the future, the diagnostics will silently omit it — recreating the exact bug this PR fixes. Issue #3422's subtask #3 explicitly suggests deriving the list dynamically. This is a design improvement for a follow-up issue.


Deep Dive: Edge Cases in Tests

⚠️ Substring matching in _find_provider_result() could be fragile

  • Location: features/steps/diagnostics_provider_coverage_steps.py, _find_provider_result() function
  • Issue: Uses provider.lower() in r["name"].lower() (substring matching). Searching for "open" would match both "Openai key" and "Openrouter key". Current test data doesn't trigger false matches, but this pattern is fragile for future maintenance.
  • Severity: Low — non-blocking.

Mock patch path is correct

The step definitions patch cleveragents.config.settings.get_settings at the original module location. Since _check_providers() uses a lazy import inside the function body, the patch correctly intercepts the lookup.

⚠️ @coverage_boost tag — cosmetic concern

The tag name implies coverage-motivated testing. The scenarios actually verify meaningful diagnostic behavior. A tag like @diagnostics or @provider_checks would better communicate intent. Non-blocking.


Good Aspects

  • Minimal, surgical production code change — only the data list is extended
  • Commit message follows Conventional Changelog format with ISSUES CLOSED: #3422 footer
  • Single atomic commit containing code + tests
  • PR body includes Closes #3422 closing keyword
  • Test scenarios cover both OK (configured) and WARN (unconfigured) paths for all 5 new providers
  • Provider names verified against ProviderType enum — all 9 non-mock providers are covered
  • Env var names in recommendations are user-appropriate (e.g., AZURE_OPENAI_API_KEY for Azure)

Decision Summary

Criterion Verdict
Specification compliance All 9 non-mock providers covered
Error handling (focus area) No new error paths; pre-existing resilience gap noted
Edge cases (focus area) All boundary conditions verified
Boundary conditions (focus area) MOCK exclusion correct; capitalize() verified
Test quality ⚠️ Mock placement violates CONTRIBUTING.md
PR metadata ⚠️ Missing Type/ label

Decision: REQUEST CHANGES 🔄

The production code is correct and safe. Two items must be addressed:

  1. Move mock helper to features/mocks/ directory (CONTRIBUTING.md compliance)
  2. Add Type/Bug label to the PR

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Independent Code Review — PR #3469 **Review Focus:** error-handling-patterns, edge-cases, boundary-conditions **Review Reason:** initial-review **Recommendation:** REQUEST CHANGES --- ### Overview This PR extends `_check_providers()` to cover all 9 non-mock providers supported by `ProviderRegistry`. The production code change is minimal and correct — only the `provider_checks` list is extended with 5 new tuples following the identical pattern of the existing 4. However, there is one required change related to CONTRIBUTING.md compliance, and several observations from the error-handling/edge-case deep dive. --- ### Required Changes #### 1. [CONTRIBUTING] Mock code must reside in `features/mocks/` directory - **Location:** `features/steps/diagnostics_provider_coverage_steps.py`, lines 14–30 - **Issue:** The `_make_settings_mock()` helper function creates `MagicMock` objects directly in the step definitions file. Per CONTRIBUTING.md, all mocking code, test doubles, and mock implementations must be placed exclusively in the `features/mocks/` directory. - **Required:** Move `_make_settings_mock()` to a file such as `features/mocks/settings_mock.py` and import it from the step definitions. - **Reference:** CONTRIBUTING.md — "All mocking code, test doubles, and mock implementations must be placed exclusively in the `features/mocks/` directory and are only permitted in unit tests." #### 2. [METADATA] PR is missing required `Type/` label - **Issue:** CONTRIBUTING.md requires every PR to have exactly one `Type/` label. This PR has none. - **Required:** Add `Type/Bug` label (matching issue #3422's `Type/Bug` label). - **Reference:** CONTRIBUTING.md — "Every PR must have exactly one `Type/` label." --- ### Deep Dive: Error Handling Patterns Given special attention to error handling, edge cases, and boundary conditions: #### ✅ Error path analysis — no new risk introduced The production code change adds 5 new `(provider_name, env_var)` tuples to a static list. The iteration logic, `settings.has_provider_configured()` call, status assignment, and recommendation generation are all unchanged. Each new entry follows the exact same code path as the existing 4 entries. **No new error paths are introduced.** #### ✅ `capitalize()` boundary check — all new names produce correct output Verified that `str.capitalize()` produces correct display names for all new providers: - `"azure"` → `"Azure"` ✅ | `"gemini"` → `"Gemini"` ✅ | `"cohere"` → `"Cohere"` ✅ | `"groq"` → `"Groq"` ✅ | `"together"` → `"Together"` ✅ #### ✅ Provider count boundary — correctly excludes MOCK `ProviderType` enum defines 10 values (including `MOCK`). The diagnostics checks exactly 9 (all non-mock providers). The test correctly asserts `exactly 9 entries`. This is the right boundary. #### ⚠️ Pre-existing: `_check_providers()` lacks exception resilience (non-blocking) Unlike other diagnostic check functions (`_check_stale_locks()`, `_check_async_worker_health()`, `_check_error_patterns()`) which wrap their logic in `try/except` blocks, `_check_providers()` has no exception handling. If `settings.has_provider_configured()` raises for any reason, the entire `build_diagnostics_data()` call fails — taking down all other diagnostic checks with it. This PR extends the surface area from 4 to 9 `has_provider_configured()` calls. While this is a pre-existing design issue (not introduced by this PR), it's worth noting as a follow-up improvement. A defensive wrapper per-provider would make the diagnostics more resilient: ```python for provider_name, env_var in provider_checks: try: configured = settings.has_provider_configured(provider_name) except Exception: configured = False # ... rest of logic ``` **Non-blocking** — the existing 4 providers have been running without issues. #### ⚠️ Pre-existing: Static list may drift from `ProviderRegistry` (non-blocking) The `provider_checks` list is hardcoded. If a new provider is added to `ProviderType` in the future, the diagnostics will silently omit it — recreating the exact bug this PR fixes. Issue #3422's subtask #3 explicitly suggests deriving the list dynamically. This is a design improvement for a follow-up issue. --- ### Deep Dive: Edge Cases in Tests #### ⚠️ Substring matching in `_find_provider_result()` could be fragile - **Location:** `features/steps/diagnostics_provider_coverage_steps.py`, `_find_provider_result()` function - **Issue:** Uses `provider.lower() in r["name"].lower()` (substring matching). Searching for `"open"` would match both `"Openai key"` and `"Openrouter key"`. Current test data doesn't trigger false matches, but this pattern is fragile for future maintenance. - **Severity:** Low — non-blocking. #### ✅ Mock patch path is correct The step definitions patch `cleveragents.config.settings.get_settings` at the original module location. Since `_check_providers()` uses a lazy import inside the function body, the patch correctly intercepts the lookup. ✅ #### ⚠️ `@coverage_boost` tag — cosmetic concern The tag name implies coverage-motivated testing. The scenarios actually verify meaningful diagnostic behavior. A tag like `@diagnostics` or `@provider_checks` would better communicate intent. Non-blocking. --- ### Good Aspects - ✅ Minimal, surgical production code change — only the data list is extended - ✅ Commit message follows Conventional Changelog format with `ISSUES CLOSED: #3422` footer - ✅ Single atomic commit containing code + tests - ✅ PR body includes `Closes #3422` closing keyword - ✅ Test scenarios cover both OK (configured) and WARN (unconfigured) paths for all 5 new providers - ✅ Provider names verified against `ProviderType` enum — all 9 non-mock providers are covered - ✅ Env var names in recommendations are user-appropriate (e.g., `AZURE_OPENAI_API_KEY` for Azure) --- ### Decision Summary | Criterion | Verdict | |-----------|---------| | Specification compliance | ✅ All 9 non-mock providers covered | | Error handling (focus area) | ✅ No new error paths; pre-existing resilience gap noted | | Edge cases (focus area) | ✅ All boundary conditions verified | | Boundary conditions (focus area) | ✅ MOCK exclusion correct; capitalize() verified | | Test quality | ⚠️ Mock placement violates CONTRIBUTING.md | | PR metadata | ⚠️ Missing `Type/` label | **Decision: REQUEST CHANGES** 🔄 The production code is correct and safe. Two items must be addressed: 1. **Move mock helper to `features/mocks/` directory** (CONTRIBUTING.md compliance) 2. **Add `Type/Bug` label** to the PR --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo added this to the v3.7.0 milestone 2026-04-05 20:48:52 +00:00
freemo left a comment

🔄 REQUEST CHANGES — PR #3469: Extend agents diagnostics to check all 9 providers

This review supersedes the previous COMMENT review. The following blocking issues must be addressed before merge:

Required Changes

1. [CONTRIBUTING] Mock code placement violation

  • The _make_settings_mock() helper function creates MagicMock objects directly in the step file (features/steps/diagnostics_provider_coverage_steps.py).
  • Per CONTRIBUTING.md: All mocking code must be confined to the features/mocks/ directory.
  • Required: Move _make_settings_mock() to features/mocks/settings_mock.py (or similar) and import from there.

2. [CONTRIBUTING] Missing milestone on PR

  • The PR has no milestone assigned.
  • Required: Assign the milestone matching issue #3422.

3. [CONTRIBUTING] Missing Type/ label on PR

  • The PR has no labels assigned.
  • Required: Add Type/Bug label.

⚠️ Non-blocking Observations

  • @coverage_boost tag name is unusual — consider @diagnostics or @providers
  • Missing tests for existing 4 providers (OpenAI, Anthropic, Google, OpenRouter)
  • Static provider list may drift from registry — consider deriving dynamically

Good Aspects

  • All 9 non-mock providers now covered
  • Env var names are accurate
  • Commit message follows Conventional Changelog format

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

## 🔄 REQUEST CHANGES — PR #3469: Extend agents diagnostics to check all 9 providers This review supersedes the previous COMMENT review. The following blocking issues must be addressed before merge: ### ❌ Required Changes #### 1. **[CONTRIBUTING] Mock code placement violation** - The `_make_settings_mock()` helper function creates `MagicMock` objects directly in the step file (`features/steps/diagnostics_provider_coverage_steps.py`). - Per CONTRIBUTING.md: All mocking code must be confined to the `features/mocks/` directory. - **Required**: Move `_make_settings_mock()` to `features/mocks/settings_mock.py` (or similar) and import from there. #### 2. **[CONTRIBUTING] Missing milestone on PR** - The PR has **no milestone** assigned. - **Required**: Assign the milestone matching issue #3422. #### 3. **[CONTRIBUTING] Missing `Type/` label on PR** - The PR has **no labels** assigned. - **Required**: Add `Type/Bug` label. ### ⚠️ Non-blocking Observations - `@coverage_boost` tag name is unusual — consider `@diagnostics` or `@providers` - Missing tests for existing 4 providers (OpenAI, Anthropic, Google, OpenRouter) - Static provider list may drift from registry — consider deriving dynamically ### ✅ Good Aspects - All 9 non-mock providers now covered - Env var names are accurate - Commit message follows Conventional Changelog format --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo force-pushed fix/diagnostics-provider-coverage from 6601976ffc
Some checks are pending
CI / benchmark-publish (pull_request) Waiting to run
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 34s
CI / security (pull_request) Successful in 57s
CI / benchmark-regression (pull_request) Waiting to run
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 6m41s
CI / e2e_tests (pull_request) Successful in 16m47s
CI / integration_tests (pull_request) Successful in 23m22s
CI / docker (pull_request) Successful in 1m24s
CI / coverage (pull_request) Successful in 11m17s
CI / status-check (pull_request) Successful in 1s
to f94ad39240
Some checks failed
CI / lint (pull_request) Failing after 31s
CI / quality (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 54s
CI / coverage (pull_request) Has been skipped
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 24s
CI / integration_tests (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / benchmark-publish (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
2026-04-05 20:58:54 +00:00
Compare
Author
Owner

Addressed all blocking items from the REQUEST_CHANGES review:

Changes Made

1. Mock code placement violation — FIXED

  • Created features/mocks/settings_mock.py with the make_settings_mock() helper function
  • Removed the inline _make_settings_mock() function from features/steps/diagnostics_provider_coverage_steps.py
  • Updated the step file to import make_settings_mock from features.mocks.settings_mock
  • This complies with CONTRIBUTING.md: all mocking code is now confined to features/mocks/

2. @coverage_boost tag renamed — FIXED

  • Renamed the feature tag from @coverage_boost to @diagnostics in features/diagnostics_provider_coverage.feature

3. PR Milestone — Already set

  • PR already has milestone v3.7.0 assigned

4. Type/Bug label — Already set

  • PR already has Type/Bug label assigned

Commit

All changes were squashed into the existing commit (amended) to maintain clean history. Force-pushed to fix/diagnostics-provider-coverage.


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

Addressed all blocking items from the REQUEST_CHANGES review: ### ✅ Changes Made #### 1. Mock code placement violation — FIXED - Created `features/mocks/settings_mock.py` with the `make_settings_mock()` helper function - Removed the inline `_make_settings_mock()` function from `features/steps/diagnostics_provider_coverage_steps.py` - Updated the step file to import `make_settings_mock` from `features.mocks.settings_mock` - This complies with CONTRIBUTING.md: all mocking code is now confined to `features/mocks/` #### 2. `@coverage_boost` tag renamed — FIXED - Renamed the feature tag from `@coverage_boost` to `@diagnostics` in `features/diagnostics_provider_coverage.feature` #### 3. PR Milestone — Already set ✅ - PR already has milestone `v3.7.0` assigned #### 4. `Type/Bug` label — Already set ✅ - PR already has `Type/Bug` label assigned ### Commit All changes were squashed into the existing commit (amended) to maintain clean history. Force-pushed to `fix/diagnostics-provider-coverage`. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo force-pushed fix/diagnostics-provider-coverage from f94ad39240
Some checks failed
CI / lint (pull_request) Failing after 31s
CI / quality (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 54s
CI / coverage (pull_request) Has been skipped
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 24s
CI / integration_tests (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / benchmark-publish (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
to 2917aa7ddb
All checks were successful
CI / lint (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 51s
CI / quality (pull_request) Successful in 46s
CI / security (pull_request) Successful in 1m0s
CI / build (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 6m47s
CI / e2e_tests (pull_request) Successful in 18m26s
CI / docker (pull_request) Successful in 1m29s
CI / integration_tests (pull_request) Successful in 22m58s
CI / coverage (pull_request) Successful in 10m55s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m49s
2026-04-05 21:06:09 +00:00
Compare
freemo left a comment

Re-Review — PR #3469: All blocking issues addressed

VERDICT: APPROVE

The implementor has addressed all blocking issues:

  1. Mock code moved to features/mocks/settings_mock.py — CONTRIBUTING.md compliance restored
  2. @coverage_boost tag renamed to @diagnostics — better communicates intent
  3. Milestone v3.7.0 and Type/Bug label — already set

This PR is ready to merge.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

## ✅ Re-Review — PR #3469: All blocking issues addressed **VERDICT: APPROVE** The implementor has addressed all blocking issues: 1. ✅ **Mock code moved to `features/mocks/settings_mock.py`** — CONTRIBUTING.md compliance restored 2. ✅ **`@coverage_boost` tag renamed to `@diagnostics`** — better communicates intent 3. ✅ **Milestone v3.7.0 and Type/Bug label** — already set **This PR is ready to merge.** --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo merged commit 99b4067ec2 into master 2026-04-05 21:19:44 +00:00
Sign in to join this conversation.
No reviewers
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!3469
No description provided.