step_mock_popen_success stored mock_proc (Popen's return value) as
context.popen_mock, but call_args is recorded on the mock *replacing*
subprocess.Popen (what patcher.start() returns). Reading call_args from
mock_proc returns None, causing TypeError in the three command-construction
scenarios — behave reports these as "errored" not "failed".
Fix: assign patcher.start() to context.popen_mock so the assertion steps
read call_args from the correct mock. Also remove the redundant
patcher.stop() calls from the assertion Then steps (context.add_cleanup
already handles teardown). Add the required @tdd_issue and @tdd_issue_691
tags to the Connect with .py file path scenario per the TDD bug fix workflow.
ISSUES CLOSED: #691
Issue references corrected from #264 to #691 throughout all documentation.
The A2A stdio transport feature is tracked by issue #691, not #264 (which was
about resource registry tables in v3.0.0).
CHANGELOG.md: Updated issue reference and added .py path routing fix entry under
BDD tests: Added command construction assertions for all three connect scenarios
(module, .py script, executable) to verify subprocess.Popen receives correct args:
- Module paths (cleveragents.X): [python, -m, module]
- .py file paths: [python, file.py]
- Executable paths: [executable_path]
When _build_from_v3() creates agents for type:llm or type:tool actors, and
when _build() processes the nested actors: map format (cleveragents version
3.0 YAML), no RouteConfig is produced. run_single_shot() then falls through
to the RxPY stream path which has no subscribers, causing the LLM to never
be invoked and the command to silently return empty output.
Fix A: after creating the agent in _build_from_v3() for type:llm/tool, call
_synthesise_single_node_route() to add a graph route with a message_router
node (catch-all rule), an actor node, and an edge to "end".
Fix B: after the agent loop in _build(), if rc.agents is non-empty and
rc.routes is empty, synthesise a default route using the cleveragents
default_actor (or the first agent).
Fix C: in _build(), the nested actors: map path now translates the v3
actor: "provider/model" key into separate provider and model keys in the
agent config dict. SimpleLLMAgent._resolve_llm() expects these keys; without
this translation, the LLM provider defaults to None (OpenAI) regardless of
the configured actor reference.
13 BDD scenarios in actor_v3_route_synthesis.feature:
- Flat v3 LLM/tool builds produce non-empty routes
- Route structure has router + actor nodes with edge to end
- Nested actors: map format produces routes, respects default_actor
- Explicit routes are not duplicated
- run_single_shot returns non-empty output with synthesised routes
- Graph actor regression guard
- Nested actors: map with actor key infers provider and model
- Nested actors: map with actor key without slash sets model only
- Nested actors: map with explicit provider/model keeps them unchanged
ISSUES CLOSED: #10807