The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(gateway): drop the stubbed local-tip resume double
Teknium580e79d7c200
diff --git a/tests/gateway/test_session_resume_compression_tip.py b/tests/gateway/test_session_resume_compression_tip.pyindex a7662c8aef9..7713f1b819a 100644--- a/tests/gateway/test_session_resume_compression_tip.py+++ b/tests/gateway/test_session_resume_compression_tip.py@@ -1,4 +1,6 @@-"""Desktop lists compression tips; session.resume must remap tip -> owner receipt."""+"""Fast unit test of session.resume's legacy-source branch: a pre-authority cli/tui/gui tip is handed+to resolve_local_target (monkeypatched here). Canonical ``source=local`` segments are covered end to+end, with a real authority and SQLite, by test_local_resume_compression_child.py (LC-12)."""from types import SimpleNamespacefrom unittest.mock import AsyncMock@@ -26,50 +28,6 @@ def _attach_snapshot(owner_ref):)-async def test_session_resume_remaps_local_source_compression_tip(monkeypatch):- """Session lists project the tip id after compression. Cold resume must remap- ``source=local`` tips to the owner via resolve_local_target — not only- LEGACY_LOCAL_SOURCES — or restore_local_session raises storage_unavailable- (no policy receipt on the child id)."""- owner_id = 'local-owner-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'- tip_id = '20261015_221307_d93723'- owner_ref = SessionRef('fixture', owner_id)- resolved = []-- monkeypatch.setattr(- 'gateway.session_local_migration.resolve_local_target',- lambda authority, actor, sid: resolved.append(sid) or owner_ref)-- row = {- 'id': tip_id,- 'source': 'local',- 'chat_id': owner_id,- 'parent_session_id': owner_id,- }- authority = SimpleNamespace(- profile_id='fixture',- instance_id='one',- events={},- db=SimpleNamespace(- get_session=lambda sid: row if sid == tip_id else None,- get_compression_tip=lambda sid: tip_id if sid in (tip_id, owner_id) else None,- ),- sessions={owner_id: SimpleNamespace(source=SimpleNamespace(platform=None))},- authorize=lambda *a, **k: None,- attach=AsyncMock(return_value=_attach_snapshot(owner_ref)),- )- connection = AuthorityConnection(- authority, object(),- {'user_id': 'owner', 'capabilities': [- 'session:create', 'session:read', 'session:control']},- )- result = await connection.resume(SessionRef('fixture', tip_id), {})- assert resolved == [tip_id]- assert result['session_id'] == owner_id- assert result['stored_session_id'] == owner_id--@pytest.mark.asyncioasync def test_session_resume_still_remaps_legacy_cli_source(monkeypatch):"""Pre-authority cli/tui/gui rows keep the previous remap path."""