moo.agent.tests.test_response_model

Tests for moo/agent/response_model.py — the Pydantic AgentResponse meta-state schema and its validators.

Stage-2: the per-tool Action/ActionUnion/ActionBase machinery and the actions field are gone. Tool calls go through PydanticAI’s native tool-call channel; this module is now only meta-state (goal, plan, done, soul_patches, build_plan) + free-text scrubbing.

Functions

test_agent_response_full_round_trip()

test_agent_response_minimal()

test_agent_response_no_actions_field()

Sanity: the legacy actions field is gone — no ToolName enum, no discriminated union — those live in the PydanticAI tool channel now.

test_agent_response_plan_field()

test_agent_response_scrubs_special_tokens()

Leaked Harmony/ChatML tokens are stripped from free-text fields.

test_soul_patch_kinds()

test_soul_patch_rejects_bad_kind()