test(pairing): cover _PENDING_USER_TURN_KEY cleanup and None allow_from

- Assert pending_user_turn is cleared from session metadata after
  shortcut commands (e.g. /help) in test_auto_compact.py.
- Add test for None allow_from / allowFrom values in
  test_base_channel.py to prevent TypeError regressions.
This commit is contained in:
chengyongru
2026-05-15 15:46:44 +08:00
committed by Xubin Ren
parent eab35af9f3
commit ac9a2d0c25
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -434,6 +434,7 @@ class TestAutoCompactIdleDetection:
assert session_after.messages[0].get("_command") is True
assert session_after.messages[1]["role"] == "assistant"
assert session_after.messages[1].get("_command") is True
assert AgentLoop._PENDING_USER_TURN_KEY not in session_after.metadata
await loop.close_mcp()
@pytest.mark.asyncio