docs: refresh stale runtime comments and docstrings (#6129)
* docs: refresh stale runtime comments and docstrings * docs: correct remaining delivery and recovery descriptions
This commit is contained in:
1 parent
e5a69544e8
commit
98f89c6a43
14 files changed
+34
-38
No files matched your search
@@ -1155,7 +1155,7 @@ class TestSummaryPersistence:
|
||||
loop.sessions.invalidate("cli:test")
|
||||
reloaded = loop.sessions.get_or_create("cli:test")
|
||||
|
||||
# Every call returns the summary from metadata (no _consumed_keys gate)
|
||||
# Every call returns the persisted summary.
|
||||
_, summary = loop.auto_compact.prepare_session(reloaded, "cli:test")
|
||||
assert summary is not None
|
||||
_, summary2 = loop.auto_compact.prepare_session(reloaded, "cli:test")
|
||||
@@ -1167,7 +1167,7 @@ class TestSummaryPersistence:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_metadata_cleanup_on_inmemory_path(self, tmp_path):
|
||||
"""In-memory _summaries path should also clean up _last_summary from metadata."""
|
||||
"""The in-memory summary path preserves _last_summary for restart recovery."""
|
||||
loop = _make_loop(tmp_path, session_ttl_minutes=15)
|
||||
session = loop.sessions.get_or_create("cli:test")
|
||||
_add_turns(session, 6, prefix="hello")
|
||||
|
||||
@@ -365,7 +365,7 @@ class TestConsolidatorSummarize:
|
||||
async def test_summarize_raw_dumps_on_llm_failure(
|
||||
self, consolidator, mock_provider, store, runtime
|
||||
):
|
||||
"""On LLM failure, raw-dump messages to HISTORY.md."""
|
||||
"""On LLM failure, append raw messages to memory/history.jsonl."""
|
||||
mock_provider.chat_stream_with_retry.side_effect = Exception("API error")
|
||||
messages = [{"role": "user", "content": "hello"}]
|
||||
result = await _archive(consolidator, messages, runtime)
|
||||
@@ -1605,7 +1605,7 @@ class TestRawArchiveTruncation:
|
||||
assert "PUBLIC_TAIL" in joined
|
||||
|
||||
def test_raw_archive_truncates_large_content(self, store):
|
||||
"""Large messages should be truncated to _RAW_ARCHIVE_MAX_CHARS."""
|
||||
"""Large messages are split across bounded journal entries."""
|
||||
big = "x" * 50_000
|
||||
messages = [{"role": "user", "content": big}]
|
||||
store.raw_archive(messages)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Tests for structured tool-event progress metadata emitted by AgentLoop."""
|
||||
"""Tests for structured tool activity emitted through AgentLoop progress events."""
|
||||
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
@@ -277,7 +277,7 @@ class TestToolEventProgress:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bus_progress_forwards_tool_events_to_outbound_metadata(self, tmp_path: Path) -> None:
|
||||
"""When run() handles a bus message, _tool_events lands in OutboundMessage metadata."""
|
||||
"""Bus-dispatched turns deliver tool activity through ProgressEvent.tool_events."""
|
||||
bus = MessageBus()
|
||||
provider = MagicMock()
|
||||
provider.get_default_model.return_value = "test-model"
|
||||
|
||||
@@ -507,8 +507,7 @@ async def test_loop_retries_think_only_final_response(tmp_path):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_streamed_flag_not_set_on_llm_error(tmp_path):
|
||||
"""When LLM errors during a streaming-capable channel interaction,
|
||||
_streamed must NOT be set so ChannelManager delivers the error."""
|
||||
"""LLM errors must not produce StreamedResponseEvent, so channels deliver the error."""
|
||||
from nanobot.agent.loop import AgentLoop
|
||||
from nanobot.bus.events import InboundMessage
|
||||
from nanobot.bus.queue import MessageBus
|
||||
|
||||
Reference in new issue
Block a user