Replace container.resolve.return_value with container.decision_service.return_value
to match actual CLI code (plan.py uses container.decision_service()). This was the
residual pattern from before the DI migration in this same PR.
Fixes CI: Robot.Plan Correct Tree Wiring (2 of 3 tests failing with exit code 1)
Replace CliRunner + unittest.mock.patch with subprocess.run for all
21 CLI-facing test functions across the M1-M6 E2E verification helpers.
Application code fixes:
- action.py: _get_lifecycle_service() uses container.plan_lifecycle_service()
- plan.py: _get_lifecycle_service() uses container.plan_lifecycle_service()
- plan.py: three container.resolve(DecisionService) → container.decision_service()
Test infrastructure:
- New robot/helper_e2e_common.py with shared subprocess utilities
(run_cli, setup_workspace with DB migrations, cleanup_workspace)
- M1-M4, M6 helpers refactored to use run_cli() with real SQLite DB
- M5 unchanged (0 CLI tests, all domain-level)
- TDD detection updated to recognise run_cli() as subprocess invocation
- Remove @tdd_expected_fail from TDD feature + robot tags
- Update 8 Behave step files that mocked container.resolve() to use
container.decision_service() / container.plan_lifecycle_service()