pub struct FanoutEchoLlmClient { /* private fields */ }Expand description
A deterministic, scripted InferenceAdapter exercising a FAN-OUT to two
concurrently-delegated python-engineer sub-agents (DOC-39 AC-13’s
acceptance proof).
Why: EchoLlmClient’s fixed script delegates to python-engineer
exactly once, so it cannot prove the fix this ticket ships — that TWO
delegations to the SAME agent_name mint DISTINCT agent_ids. This
client scripts the PM issuing both delegate_to_agent calls in ONE
assistant turn (a genuine tool-calls fan-out); agent_loop::dispatch_all
still dispatches them one after another (there is no concurrent-execution
primitive in the loop itself), but each dispatch re-enters
runner::in_process::InProcessAgentRunner::run_pipeline — the ONE
production call site that mints a fresh UUID v4 per spawn — so the
two engineer sub-loops still get their OWN agent_id even though they run
sequentially. That is exactly what AC-13 requires: agent_name alone
cannot distinguish the two, agent_id can.
What: an atomic cursor over a fixed 6-response script:
- PM’s ONE assistant turn issues TWO
delegate_to_agenttool calls, both targetingpython-engineer(call-delegate-a,call-delegate-b). - Engineer A calls
bash(command="echo hello-from-engineer-a"). - Engineer A stops with final text.
- Engineer B calls
bash(command="echo hello-from-engineer-b"). - Engineer B stops with final text.
- PM stops with final text.
Running past the script’s end returns an InferenceError rather than panicking.
Test: task::mock_llm::tests::fanout_script_drives_two_delegations_to_the_same_agent;
exercised end-to-end (as a real subprocess) by tests/agent_id_e2e.rs.
Implementations§
Trait Implementations§
Source§impl Default for FanoutEchoLlmClient
impl Default for FanoutEchoLlmClient
Source§impl InferenceAdapter for FanoutEchoLlmClient
impl InferenceAdapter for FanoutEchoLlmClient
Source§fn capabilities(&self) -> &ProviderCapabilities
fn capabilities(&self) -> &ProviderCapabilities
Source§fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, InferenceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, InferenceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn capabilities_for(&self, model: &str) -> &ProviderCapabilities
fn capabilities_for(&self, model: &str) -> &ProviderCapabilities
model. Read moreSource§fn chat_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatStreamEvent, InferenceError>> + Send>>, InferenceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn chat_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatStreamEvent, InferenceError>> + Send>>, InferenceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn map_tool_choice(&self, choice: ToolChoice) -> Value
fn map_tool_choice(&self, choice: ToolChoice) -> Value
ToolChoice into this provider’s wire JSON. Read moreSource§fn supports_native_tools(&self) -> bool
fn supports_native_tools(&self) -> bool
Source§fn supports_prompt_caching(&self) -> bool
fn supports_prompt_caching(&self) -> bool
Source§fn supports_structured_output(&self) -> bool
fn supports_structured_output(&self) -> bool
Source§fn wants_detailed_usage(&self) -> bool
fn wants_detailed_usage(&self) -> bool
usage: {"include": true} directive). Read moreAuto Trait Implementations§
impl !Freeze for FanoutEchoLlmClient
impl RefUnwindSafe for FanoutEchoLlmClient
impl Send for FanoutEchoLlmClient
impl Sync for FanoutEchoLlmClient
impl Unpin for FanoutEchoLlmClient
impl UnsafeUnpin for FanoutEchoLlmClient
impl UnwindSafe for FanoutEchoLlmClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more