TDD: Write failing test for #647 — Container.resolve() crash in plan tree/explain/correct #648

Closed
opened 2026-03-09 19:01:53 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: test(cli): add TDD failing tests for Container.resolve() crash
  • Branch: tdd/m3-container-resolve-crash

Parent

Bug: #647Container.resolve() does not exist — plan tree/explain/correct crash with AttributeError

Background and Context

Per CONTRIBUTING.md TDD Bug Fix Workflow, every Type/Bug issue requires a Type/Testing counterpart. Bug #647 root cause: three CLI commands (plan tree, plan explain, plan correct) call container.resolve(DecisionService), but the Container class has no resolve() method. The commands crash with AttributeError.

Existing M3 integration tests (robot/m3_e2e_verification.robot / helper_m3_e2e_verification.py) do not catch this bug because they mock get_container() with MagicMock, which auto-creates any attribute.

Acceptance Criteria

  • Behave BDD scenarios tagged @tdd_bug @tdd_bug_647 @tdd_expected_fail that invoke plan tree, plan explain, and plan correct against a real DI container (not MagicMock)
  • Robot Framework integration smoke tests for each of the three commands
  • Tests fail with AttributeError: 'DynamicContainer' object has no attribute 'resolve' until bug #647 is fixed
  • After bug #647 fix, remove @tdd_expected_fail tags and verify tests pass
  • Settings.reset() classmethod added for robust singleton cleanup in test teardown (used by core test cleanup)
  • Explain assertion validates child decision content (FastAPI), not root decision content

Dependencies

  • Blocks: #647 (bug fix cannot merge until TDD tests exist)

Definition of Done

TDD tests reproducing bug #647 are merged to master.

## Metadata - **Commit Message**: `test(cli): add TDD failing tests for Container.resolve() crash` - **Branch**: ` tdd/m3-container-resolve-crash` ## Parent Bug: #647 — `Container.resolve()` does not exist — plan tree/explain/correct crash with AttributeError ## Background and Context Per CONTRIBUTING.md TDD Bug Fix Workflow, every Type/Bug issue requires a Type/Testing counterpart. Bug #647 root cause: three CLI commands (`plan tree`, `plan explain`, `plan correct`) call `container.resolve(DecisionService)`, but the `Container` class has no `resolve()` method. The commands crash with `AttributeError`. Existing M3 integration tests (`robot/m3_e2e_verification.robot` / `helper_m3_e2e_verification.py`) do not catch this bug because they mock `get_container()` with `MagicMock`, which auto-creates any attribute. ## Acceptance Criteria - [x] Behave BDD scenarios tagged `@tdd_bug @tdd_bug_647 @tdd_expected_fail` that invoke `plan tree`, `plan explain`, and `plan correct` against a real DI container (not MagicMock) - [x] Robot Framework integration smoke tests for each of the three commands - [x] Tests fail with `AttributeError: 'DynamicContainer' object has no attribute 'resolve'` until bug #647 is fixed - [x] After bug #647 fix, remove `@tdd_expected_fail` tags and verify tests pass - [x] `Settings.reset()` classmethod added for robust singleton cleanup in test teardown (used by core test cleanup) - [x] Explain assertion validates child decision content (`FastAPI`), not root decision content ## Dependencies - Blocks: #647 (bug fix cannot merge until TDD tests exist) ## Definition of Done TDD tests reproducing bug #647 are merged to master.
freemo added this to the v3.2.0 milestone 2026-03-09 19:01:59 +00:00
Author
Owner

PM Note (Day 29) — Assignment

Changes:

  • Assignee: (unassigned) → @aditya

Rationale: TDD test for #647 (Container.resolve crash, 2 SP). Aditya has bandwidth while waiting for PR #528 review feedback. This is a quick TDD issue — write the failing test that proves the bug exists.

@aditya — Write a failing test that reproduces the Container.resolve crash described in #647. Tag it with @wip for now (until the @tdd_expected_fail infrastructure is built). This should be quick (2 SP) and can be done in parallel with your PR #528 fixes.

**PM Note (Day 29) — Assignment** **Changes:** - **Assignee**: (unassigned) → @aditya **Rationale:** TDD test for #647 (Container.resolve crash, 2 SP). Aditya has bandwidth while waiting for PR #528 review feedback. This is a quick TDD issue — write the failing test that proves the bug exists. @aditya — Write a failing test that reproduces the Container.resolve crash described in #647. Tag it with `@wip` for now (until the `@tdd_expected_fail` infrastructure is built). This should be quick (2 SP) and can be done in parallel with your PR #528 fixes.
Author
Owner

PM Status (Day 31): PR #670 is the only mergeable open PR in the entire repository (19 of 20 others have merge conflicts).

@aditya — PR #670 has REQUEST_CHANGES from both @hurui200320 (7 findings) and @CoreRasurae (10 findings). Please address the review feedback and push fixes so this can merge.

Why this matters: Bug #647 (assigned to @hurui200320) is blocked by this TDD issue. #647 is one of 3 remaining M3 bugs. M3 is 16 days past target and cannot close until all 3 bugs are resolved.

Priority: This is on the critical path. Please prioritize over estimation domain work (#649-#652).

**PM Status (Day 31)**: PR #670 is the **only mergeable open PR** in the entire repository (19 of 20 others have merge conflicts). @aditya — PR #670 has `REQUEST_CHANGES` from both @hurui200320 (7 findings) and @CoreRasurae (10 findings). Please address the review feedback and push fixes so this can merge. **Why this matters**: Bug #647 (assigned to @hurui200320) is **blocked** by this TDD issue. #647 is one of 3 remaining M3 bugs. M3 is 16 days past target and cannot close until all 3 bugs are resolved. **Priority**: This is on the critical path. Please prioritize over estimation domain work (#649-#652).
Author
Owner

PM Follow-up — Day 31 (2026-03-11)

PR #670 is the only merge-conflict-free PR in the entire repo and is on the critical path for M3 closure (#647#648 → PR #670).

@aditya — 17 review findings were posted by 2 reviewers. Please prioritize addressing these today. The bug fix for #647 (@hurui200320) is blocked until this TDD PR merges.

Remaining:

  1. Address all 17 review findings on PR #670
  2. Get merge approval
  3. Once merged, #647 bug fix can proceed
## PM Follow-up — Day 31 (2026-03-11) PR #670 is the **only merge-conflict-free PR** in the entire repo and is on the critical path for M3 closure (#647 → #648 → PR #670). @aditya — 17 review findings were posted by 2 reviewers. Please prioritize addressing these today. The bug fix for #647 (@hurui200320) is blocked until this TDD PR merges. **Remaining:** 1. Address all 17 review findings on PR #670 2. Get merge approval 3. Once merged, #647 bug fix can proceed
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.

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