fix(cli): replace non-existent Container.resolve() with named provider calls #1157

Merged
hurui200320 merged 1 commits from bugfix/m3-container-resolve into master 2026-03-30 05:45:10 +00:00

1 Commits

Author SHA1 Message Date
hurui200320 2651e15854 fix(cli): replace non-existent Container.resolve() with named provider calls
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 37s
CI / lint (pull_request) Successful in 3m35s
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 4m25s
CI / unit_tests (pull_request) Successful in 4m19s
CI / integration_tests (pull_request) Successful in 4m1s
CI / docker (pull_request) Successful in 11s
CI / e2e_tests (pull_request) Successful in 10m42s
CI / coverage (pull_request) Successful in 9m42s
CI / status-check (pull_request) Successful in 2s
CI / lint (push) Successful in 23s
CI / typecheck (push) Successful in 50s
CI / quality (push) Successful in 53s
CI / security (push) Successful in 1m2s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 40s
CI / helm (push) Successful in 43s
CI / integration_tests (push) Successful in 4m29s
CI / unit_tests (push) Successful in 5m7s
CI / docker (push) Successful in 1m20s
CI / e2e_tests (push) Successful in 11m58s
CI / coverage (push) Successful in 14m35s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 33m38s
CI / benchmark-regression (pull_request) Successful in 1h2m19s
The three plan.py call sites (tree, explain, correct) that originally used
container.resolve(DecisionService) were already fixed in master. This commit
completes the fix by aligning the Robot Framework test mocks to match the
corrected production code:

- robot/helper_m3_decision_validation_smoke.py: mock_container.resolve →
  mock_container.decision_service (plan correct dry-run path)
- robot/helper_m4_correction_subplan_smoke.py: container.resolve →
  container.decision_service (correction subplan path)

Both helpers previously passed silently because MagicMock auto-creates any
attribute, masking the mismatch between mock setup and actual code. Added
spec=Container to both mock containers so that accessing non-existent
attributes raises AttributeError, matching real container behavior.

Updated comment wording in features/container_resolve_crash.feature to
clarify that the bug is fixed and the scenarios serve as permanent
regression guards. The @tdd_expected_fail tag was already removed by the
TDD branch before this fix branch was created; the permanent @tdd_issue
and @tdd_issue_647 tags remain per TDD tag lifecycle rules.

Added CHANGELOG.md entry describing the fix.

ISSUES CLOSED: #647
2026-03-30 04:45:56 +00:00