fix(acp): drop dead message_id kwarg from replay chunks
UserMessageChunk and AgentMessageChunk do not have a message_id field in the ACP schema. Passing it silently dropped the kwarg (pydantic does not raise on unknown init kwargs here) and the subsequent test assertions on .message_id raised AttributeError. Strip the dead plumbing (uuid import, message_id= kwarg on both chunk types, unused session_id/index parameters) and remove the matching .message_id asserts from the test.
This commit is contained in:
@@ -254,10 +254,8 @@ class TestSessionOps:
|
||||
assert len(replay_calls) == 2
|
||||
assert isinstance(replay_calls[0].kwargs["update"], UserMessageChunk)
|
||||
assert replay_calls[0].kwargs["update"].content.text == "what controls the / slash commands?"
|
||||
assert replay_calls[0].kwargs["update"].message_id
|
||||
assert isinstance(replay_calls[1].kwargs["update"], AgentMessageChunk)
|
||||
assert replay_calls[1].kwargs["update"].content.text.startswith("HermesACPAgent")
|
||||
assert replay_calls[1].kwargs["update"].message_id
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_resume_session_replays_persisted_history_to_client(self, agent):
|
||||
|
||||
Reference in New Issue
Block a user