UAT: FixThenRevalidateOrchestrator wired with validation_pipeline=None in DI container — fix-then-revalidate orchestration is broken #3494

Open
opened 2026-04-05 18:38:59 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/fix-then-revalidate-orchestrator-di-wiring
  • Commit Message: fix(container): wire FixThenRevalidateOrchestrator with real ValidationPipeline in DI container
  • Milestone: (none — backlog)
  • Parent Epic: #394

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Bug Description

The FixThenRevalidateOrchestrator service is registered in the DI container (src/cleveragents/application/container.py) with validation_pipeline=None. The FixThenRevalidateOrchestrator.__init__() method raises a ValidationError if validation_pipeline is None (per the code at line 263–264 in fix_then_revalidate.py). This means any attempt to use the fix-then-revalidate orchestration will immediately fail with a ValidationError.

Code Location

src/cleveragents/application/container.py (line ~774):

fix_then_revalidate_orchestrator = providers.Factory(
    FixThenRevalidateOrchestrator,
    validation_pipeline=None,  # ← BUG: None causes ValidationError on instantiation
    event_bus=event_bus,
)

src/cleveragents/application/services/fix_then_revalidate.py (lines 263–264):

if validation_pipeline is None:
    raise ValidationError("validation_pipeline must not be None")

Expected Behavior

The FixThenRevalidateOrchestrator should be wired with a real ValidationPipeline instance (or a factory that creates one) so that fix-then-revalidate cycles can actually run validations after applying fixes.

Actual Behavior

Any code that calls container.fix_then_revalidate_orchestrator() will receive a ValidationError immediately because validation_pipeline=None violates the constructor's precondition.

Impact

Medium — the fix-then-revalidate orchestration feature is completely broken at the DI wiring level. This is a backlog item since the feature may not be actively used yet, but it must be fixed before the feature can be used in production.

This bug is related to the broader issue of ValidationPipeline not being integrated into the plan lifecycle. The fix for this bug depends on first having a properly wired ValidationPipeline in the container.

Subtasks

  • Identify the correct ValidationPipeline provider (or factory) that should be injected into FixThenRevalidateOrchestrator
  • Update src/cleveragents/application/container.py to wire validation_pipeline with the real ValidationPipeline provider instead of None
  • Verify FixThenRevalidateOrchestrator can be instantiated without raising ValidationError
  • Tests (Behave): Add/update scenario to assert that container.fix_then_revalidate_orchestrator() resolves without error and that validation_pipeline is not None
  • Tests (Behave): Add TDD issue-capture test (@tdd_expected_fail) demonstrating the bug before the fix
  • 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.
  • container.fix_then_revalidate_orchestrator() resolves a fully wired FixThenRevalidateOrchestrator instance with a non-None validation_pipeline.
  • No ValidationError is raised on DI container resolution of fix_then_revalidate_orchestrator.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly: fix(container): wire FixThenRevalidateOrchestrator with real ValidationPipeline in DI container
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly: fix/fix-then-revalidate-orchestrator-di-wiring
  • The commit is submitted as a pull request to master, reviewed, and merged.
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/fix-then-revalidate-orchestrator-di-wiring` - **Commit Message**: `fix(container): wire FixThenRevalidateOrchestrator with real ValidationPipeline in DI container` - **Milestone**: *(none — backlog)* - **Parent Epic**: #394 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Description The `FixThenRevalidateOrchestrator` service is registered in the DI container (`src/cleveragents/application/container.py`) with `validation_pipeline=None`. The `FixThenRevalidateOrchestrator.__init__()` method raises a `ValidationError` if `validation_pipeline` is `None` (per the code at line 263–264 in `fix_then_revalidate.py`). This means any attempt to use the fix-then-revalidate orchestration will immediately fail with a `ValidationError`. ### Code Location **`src/cleveragents/application/container.py`** (line ~774): ```python fix_then_revalidate_orchestrator = providers.Factory( FixThenRevalidateOrchestrator, validation_pipeline=None, # ← BUG: None causes ValidationError on instantiation event_bus=event_bus, ) ``` **`src/cleveragents/application/services/fix_then_revalidate.py`** (lines 263–264): ```python if validation_pipeline is None: raise ValidationError("validation_pipeline must not be None") ``` ### Expected Behavior The `FixThenRevalidateOrchestrator` should be wired with a real `ValidationPipeline` instance (or a factory that creates one) so that fix-then-revalidate cycles can actually run validations after applying fixes. ### Actual Behavior Any code that calls `container.fix_then_revalidate_orchestrator()` will receive a `ValidationError` immediately because `validation_pipeline=None` violates the constructor's precondition. ### Impact **Medium** — the fix-then-revalidate orchestration feature is completely broken at the DI wiring level. This is a backlog item since the feature may not be actively used yet, but it must be fixed before the feature can be used in production. ### Related This bug is related to the broader issue of `ValidationPipeline` not being integrated into the plan lifecycle. The fix for this bug depends on first having a properly wired `ValidationPipeline` in the container. ## Subtasks - [ ] Identify the correct `ValidationPipeline` provider (or factory) that should be injected into `FixThenRevalidateOrchestrator` - [ ] Update `src/cleveragents/application/container.py` to wire `validation_pipeline` with the real `ValidationPipeline` provider instead of `None` - [ ] Verify `FixThenRevalidateOrchestrator` can be instantiated without raising `ValidationError` - [ ] Tests (Behave): Add/update scenario to assert that `container.fix_then_revalidate_orchestrator()` resolves without error and that `validation_pipeline` is not `None` - [ ] Tests (Behave): Add TDD issue-capture test (`@tdd_expected_fail`) demonstrating the bug before the fix - [ ] 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. - [ ] `container.fix_then_revalidate_orchestrator()` resolves a fully wired `FixThenRevalidateOrchestrator` instance with a non-`None` `validation_pipeline`. - [ ] No `ValidationError` is raised on DI container resolution of `fix_then_revalidate_orchestrator`. - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly: `fix(container): wire FixThenRevalidateOrchestrator with real ValidationPipeline in DI container` - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly: `fix/fix-then-revalidate-orchestrator-di-wiring` - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged**. - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-05 20:36:13 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:51:07 +00:00
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
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3494
No description provided.