fix(cli): replace non-existent Container.resolve() with named provider calls #1157
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
#647 fix(cli): Container.resolve() does not exist — plan tree/explain/correct crash with AttributeError
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!1157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m3-container-resolve"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #647
Fixes the
Container.resolve()crash inplan tree,plan explain, andplan correctCLI commands by aligning Robot Framework test mocks with the corrected production code.Changes
Robot Framework Mock Alignment
robot/helper_m3_decision_validation_smoke.py: Updated mock frommock_container.resolve.return_valuetomock_container.decision_service.return_valueto match the production code path (container.decision_service()). Addedspec=Containerto prevent silent attribute auto-creation.robot/helper_m4_correction_subplan_smoke.py: Same fix in_mock_container()helper function, also withspec=Container.BDD Feature File Comment Update
features/container_resolve_crash.feature: Updated comment wording to clarify that bug #647 is fixed and the scenarios serve as permanent regression guards. The@tdd_expected_failtag was already removed by the TDD branch prior to this fix branch being created; the permanent@tdd_issueand@tdd_issue_647tags remain per TDD tag lifecycle rules in CONTRIBUTING.md.CHANGELOG
CHANGELOG.md: Added entry under## Unreleaseddescribing the fix.Context
The three
container.resolve(_DS)call sites inplan.pywere already replaced withcontainer.decision_service()in master. However, two Robot test helpers still used the old mock pattern (container.resolve.return_value), which passed silently because MagicMock auto-creates any attribute. This commit completes the fix by ensuring mocks match the actual production code, and addsspec=Containerto both mock containers so that any future attribute mismatches will raiseAttributeErrorinstead of passing silently.Quality Gates
9e39c5a683021fb9985e021fb9985e946aaf0620946aaf06203589a495adCode Review Note
Unable to review — the branch for this PR (expected
bugfix/m3-container-resolveor similar) was not found on the remote. A TDD branchtdd/container-resolve-crashexists with regression tests but not the actual fix. Please verify the fix branch has been pushed.Day 48 Planning Review — Bug Fix PR for #647
The code fix itself (replacing
Container.resolve()with named provider calls) is sound and well-scoped. However, there are blocking issues that must be resolved before merge:Merge conflicts —
mergeable: false. Branch must be rebased onto currentmaster.@tdd_expected_failremoval not visible in diff — The PR description claims the tag was removed, but the diff only shows a comment rewording infeatures/container_resolve_crash.feature. If the tag was already absent on master before this branch was created, the description is misleading. Please clarify: was@tdd_expected_failpresent on this branch before your changes? If not, remove the claim from the PR description.Tag naming mismatch — The feature file uses
@tdd_issue/@tdd_issue_647but CONTRIBUTING.md requires@tdd_bug/@tdd_bug_647. The three-tag system specified in CONTRIBUTING.md uses@tdd_bug,@tdd_bug_<N>, and@tdd_expected_fail— not@tdd_issue. Please verify and correct the tag names if needed.@freemo's comment (Mar 27) about the branch not being found on the remote — @hurui200320, please reply confirming the branch is now available and request re-review.
Requested changes: Rebase onto master, resolve tag naming, clarify
@tdd_expected_failremoval, respond to @freemo's comment.Review: APPROVED
Small, focused fix. Using
MagicMock(spec=Container)correctly prevents auto-creating non-existent attributes. Properly replaces the non-existentcontainer.resolve()with actual DI provider calls.3589a495ad2651e15854New commits pushed, approval review dismissed automatically according to repository settings
Thanks for the thorough review, Jeff.
Point 2 (
@tdd_expected_failremoval): You're right — the@tdd_expected_failtag was already absent on master before this branch was created. The PR description was misleading. I've updated it to accurately reflect that only a comment rewording was made in the feature file, not a tag removal. I've also corrected the tag name references from@tdd_bug/@tdd_bug_647to@tdd_issue/@tdd_issue_647to match what's actually in the file.Point 3 (tag naming): The feature file uses
@tdd_issue/@tdd_issue_647, which is actually the correct naming per CONTRIBUTING.md (lines 1190-1192). The three-tag system defined there uses@tdd_issue,@tdd_issue_<N>, and@tdd_expected_fail. Some older CHANGELOG entries reference@tdd_bug(a historical convention), but the authoritative specification in CONTRIBUTING.md uses@tdd_issue. No change needed here.Branch has been rebased onto the latest master and force-pushed. The PR is now mergeable and all quality gates pass.
Note: This reply was generated by opencode.