refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -54,7 +54,6 @@ async def test_restart_before_model_call_waits_for_confirmation(tmp_path: Path)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_stale_incomplete_transcript_waits_for_confirmation(tmp_path: Path, monkeypatch) -> None:
|
||||
"""A materialized shutdown must not reappear as an endless Working state."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
_persist(sessions, session)
|
||||
@@ -80,7 +79,6 @@ async def test_materialized_interruption_can_continue_from_saved_context(
|
||||
tmp_path: Path,
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
"""Older shutdowns may have cleared the checkpoint after saving partial history."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
session.messages.extend(
|
||||
@@ -193,7 +191,6 @@ async def test_scan_loads_only_sessions_that_need_webui_recovery(
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_live_turn_followup_survives_restart_until_it_is_committed(tmp_path: Path) -> None:
|
||||
"""A message injected mid-turn is not lost between checkpoints."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
_persist(sessions, session)
|
||||
@@ -224,7 +221,6 @@ async def test_live_turn_followup_survives_restart_until_it_is_committed(tmp_pat
|
||||
|
||||
|
||||
def test_followup_journal_keeps_every_uncommitted_message(tmp_path: Path) -> None:
|
||||
"""A live queue limit must never truncate durable WebUI follow-ups."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
followup_ids = [
|
||||
@@ -251,7 +247,6 @@ def test_followup_journal_keeps_every_uncommitted_message(tmp_path: Path) -> Non
|
||||
|
||||
|
||||
def test_requeued_followup_preserves_its_journal_id(tmp_path: Path) -> None:
|
||||
"""Routing a recovered follow-up into a live turn must remain idempotent."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
original_id = record_pending_followup(
|
||||
@@ -343,7 +338,6 @@ async def test_uncertain_tool_is_never_replayed(tmp_path: Path) -> None:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_unknown_checkpoint_waits_for_confirmation(tmp_path: Path) -> None:
|
||||
"""Malformed or newer checkpoint phases fail closed pending confirmation."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
session.messages.append({"role": "user", "content": "deploy it"})
|
||||
@@ -385,7 +379,6 @@ async def test_unknown_checkpoint_waits_for_confirmation(tmp_path: Path) -> None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_malformed_checkpoint_can_always_be_dismissed(tmp_path: Path) -> None:
|
||||
"""Corrupt private state must not trap the user in a failed recovery notice."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
session.messages.append({"role": "user", "content": "deploy it"})
|
||||
@@ -414,7 +407,6 @@ async def test_malformed_checkpoint_can_always_be_dismissed(tmp_path: Path) -> N
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_known_but_malformed_checkpoint_cannot_continue(tmp_path: Path) -> None:
|
||||
"""A known phase does not make corrupt tool state safe to resume."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
session.messages.append({"role": "user", "content": "send it"})
|
||||
@@ -473,7 +465,6 @@ async def test_malformed_final_response_is_not_reported_as_restored(tmp_path: Pa
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_checkpoint_with_missing_tool_result_cannot_continue(tmp_path: Path) -> None:
|
||||
"""Never resume when persisted results do not cover every requested tool."""
|
||||
sessions = SessionManager(tmp_path)
|
||||
session = sessions.get_or_create("websocket:chat")
|
||||
session.messages.append({"role": "user", "content": "send both"})
|
||||
|
||||
Reference in new issue
Block a user