fix(test): convert M1-M6 E2E suites to real subprocess CLI invocations (closes #658) #784

Merged
brent.edwards merged 3 commits from bugfix/m6-e2e-mock-only-coverage into master 2026-03-12 22:13:47 +00:00

3 Commits

Author SHA1 Message Date
brent.edwards 717550c59e Merge branch 'master' into bugfix/m6-e2e-mock-only-coverage
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 18s
CI / build (pull_request) Successful in 21s
CI / e2e_tests (pull_request) Successful in 33s
CI / security (pull_request) Successful in 1m4s
CI / typecheck (pull_request) Successful in 1m11s
CI / unit_tests (pull_request) Successful in 3m4s
CI / integration_tests (pull_request) Successful in 3m47s
CI / docker (pull_request) Successful in 43s
CI / coverage (pull_request) Successful in 6m36s
CI / benchmark-regression (pull_request) Successful in 37m38s
2026-03-12 22:03:28 +00:00
brent.edwards 94d953246d fix(test): correct mock wiring in plan_correct_tree_wiring Robot helper
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 3m0s
CI / integration_tests (pull_request) Successful in 3m26s
CI / docker (pull_request) Successful in 41s
CI / coverage (pull_request) Successful in 5m26s
CI / benchmark-regression (pull_request) Has been cancelled
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)
2026-03-12 21:53:38 +00:00
Brent E. Edwards 5e625b22e1 fix(test): convert M1-M6 E2E suites to real subprocess CLI invocations (closes #658)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 18s
CI / quality (pull_request) Successful in 18s
CI / typecheck (pull_request) Successful in 39s
CI / security (pull_request) Successful in 39s
CI / unit_tests (pull_request) Successful in 3m15s
CI / integration_tests (pull_request) Failing after 3m33s
CI / docker (pull_request) Successful in 2m6s
CI / coverage (pull_request) Successful in 5m20s
CI / benchmark-regression (pull_request) Successful in 36m19s
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()
2026-03-12 20:42:14 +00:00