Merge origin/main into feat/session-replay-file-cap-invariants

Preserve main's timestamp/tool-context replay semantics while keeping the PR's session history and file-cap budgets.

Made-with: Cursor
This commit is contained in:
Xubin Ren
2026-04-27 07:32:00 +00:00
30 changed files with 1297 additions and 65 deletions
+5 -1
View File
@@ -178,7 +178,11 @@ class TestAgentLoopTTLParam:
content="hello",
)
await loop._process_message(msg)
session.get_history.assert_called_once_with(max_messages=7, max_tokens=333)
session.get_history.assert_called_once_with(
max_messages=7,
max_tokens=333,
include_timestamps=True,
)
@pytest.mark.asyncio
async def test_session_file_cap_archives_and_trims_old_messages(self, tmp_path):