Drives the full req_managed_agents AgentCore Harness client stack end-to-end
as a single repeatable command — no live AWS needed.
What it covers
The stub Req adapter intercepts at the transport seam so SigV4 signing, JSON
encoding, EventStream decoding, Converse parsing, and the tool→resume loop all
run in-process against real production code. The adapter returns valid
event-stream binary frames for each turn; the loop runs to an end_turn
terminal.
Eight stages are verified:
- SigV4 header well-formed —
SigV4.sign_request/4producesauthorization+x-amz-dateheaders. - EventStream multi-frame + remainder — decode two complete frames and a 5-byte truncated third; expect 2 messages and a non-empty remainder.
- Converse.inline_function shape — a NimbleOptions schema maps to a
config.inlineFunction.inputSchema(bare JSON Schema, nojsonwrapper) with the expected property. - SigV4 signed — every
invoke_harnessrequest carried anAWS4-HMAC-SHA256Authorization header. - tool_use decoded+parsed — the loop actually ran the tool (the resume turn fired).
- strict resume contract — the resume body contained BOTH
assistant(toolUse) anduser(toolResult) roles (the harness does not persist the model's streamed response, so we echo it back). - tool text round-trip — the toolResult text in the resume body equals
"echoed: hi". - terminal end_turn —
invoke_to_completionreturned{:ok, %{terminal: :end_turn, stop_reason: "end_turn"}}.
Usage
mix req_managed_agents.agent_core.smokeExits 0 on all-pass, non-zero on any failure.
Summary
Functions
Pure smoke flow — returns {:ok, results} or {:error, results} where
results is a list of {stage_name, :pass | :fail, detail}.
Functions
@spec run_smoke() :: {:ok, [{String.t(), :pass | :fail, String.t()}]} | {:error, [{String.t(), :pass | :fail, String.t()}]}
Pure smoke flow — returns {:ok, results} or {:error, results} where
results is a list of {stage_name, :pass | :fail, detail}.
Does not print or halt; suitable for calling directly from tests.