Commit Graph

2 Commits

Author SHA1 Message Date
freemo dfa05a6909 fix(cli): wire real LLM actors into plan executor for production execution
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 26s
CI / quality (pull_request) Successful in 32s
CI / build (pull_request) Successful in 35s
CI / security (pull_request) Successful in 52s
CI / typecheck (pull_request) Successful in 56s
CI / e2e_tests (pull_request) Successful in 1m36s
CI / unit_tests (pull_request) Successful in 3m25s
CI / integration_tests (pull_request) Successful in 3m55s
CI / docker (pull_request) Successful in 57s
CI / coverage (pull_request) Successful in 6m54s
CI / lint (push) Successful in 14s
CI / quality (push) Successful in 35s
CI / typecheck (push) Successful in 39s
CI / security (push) Successful in 51s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 21s
CI / e2e_tests (push) Successful in 2m14s
CI / unit_tests (push) Successful in 5m9s
CI / integration_tests (push) Successful in 5m29s
CI / docker (push) Successful in 1m6s
CI / coverage (push) Successful in 6m12s
CI / benchmark-publish (push) Successful in 20m51s
CI / benchmark-regression (pull_request) Successful in 37m16s
The `plan execute` CLI command only performed phase transitions
(Strategize → Execute) without ever invoking the `PlanExecutor` to
drive the strategize or execute actors.  `PlanExecutor.__init__`
unconditionally created `StrategizeStubActor()` and
`ExecuteStubActor()` which parse text locally and return empty
changesets — no real LLM call was made.

Added `_get_plan_executor()` helper that resolves `ProviderRegistry`
from the DI container and constructs `LLMStrategizeActor` /
`LLMExecuteActor` for real LLM invocations via LangChain.  Updated
`execute_plan` CLI command to detect plan phase/state and
automatically run the appropriate actor:

- Strategize/queued  → run strategize actor → transition to Execute
- Strategize/complete → phase transition only (backward compat)
- Execute/queued     → run execute actor → mark complete

New `llm_actors.py` module provides `LLMStrategizeActor` (task
decomposition into numbered steps) and `LLMExecuteActor` (code
generation with FILE: blocks).  Both resolve `provider/model` actor
names (e.g. `openai/gpt-4`) to live LangChain LLM instances.

`PlanExecutor.__init__` now accepts optional `strategize_actor` and
`execute_actor` parameters, falling back to stubs when None.
Existing mock-based BDD tests remain backward-compatible via duck-
typing fallback (MagicMock.phase is not a PlanPhase, so the legacy
`service.execute_plan()` path is taken).

Includes Behave BDD scenarios testing custom actor injection into
PlanExecutor.

ISSUES CLOSED: #960
2026-03-15 19:59:38 -04:00
freemo 7aa36759c6 feat(plan): execute strategize and execute via actors 2026-02-21 10:18:26 -05:00