refactor: remove verified unused internals (#6460)

* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 21:45:36 +08:00
1 parent 3230013963
commit f23a6d1485
105 files changed
+207 -1282

No files matched your search

+1 -18
View File
@@ -3,13 +3,12 @@
from __future__ import annotations
import asyncio
from unittest.mock import AsyncMock, MagicMock, patch
from unittest.mock import AsyncMock, MagicMock
import pytest
import tiktoken
from agent.runner_helpers import make_run_spec
from agent.session_helpers import mock_session_manager
from nanobot.agent.context import TranscriptInput
from nanobot.agent.context_governance import (
BACKFILL_CONTENT,
@@ -77,22 +76,6 @@ def _compaction_state(spec: AgentRunSpec) -> ContextCompactionState:
)
def _make_loop(tmp_path):
from nanobot.agent.loop import AgentLoop
from nanobot.bus.queue import MessageBus
bus = MessageBus()
provider = MagicMock()
provider.get_default_model.return_value = "test-model"
with patch("nanobot.agent.loop.ContextBuilder"), \
patch("nanobot.agent.loop.SessionManager", side_effect=mock_session_manager), \
patch("nanobot.agent.loop.SubagentManager") as mock_sub_mgr:
mock_sub_mgr.return_value.cancel_by_session = AsyncMock(return_value=0)
loop = AgentLoop(bus=bus, provider=provider, workspace=tmp_path)
return loop
async def test_provider_can_emit_without_an_event_specific_runner_callback():
from nanobot.events import AgentEvent