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
@@ -1,5 +1,3 @@
|
||||
"""Model editing commits disk settings before admitting a refreshed runtime."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
@@ -94,7 +92,6 @@ async def test_model_save_commits_before_refreshing_next_session_admission(
|
||||
prior = await admit("prior")
|
||||
cached_preset = await admit("prior-preset", explicit_preset=True)
|
||||
draft = {"name": "chat", "context_window_tokens": 500_000}
|
||||
# A draft is just client-owned data, not disk or runtime state.
|
||||
assert disk_window() == 100_000
|
||||
assert prior.context_window_tokens == cached_preset.context_window_tokens == 100_000
|
||||
assert (await admit("draft-only")).context_window_tokens == 100_000
|
||||
@@ -114,8 +111,6 @@ async def test_model_save_commits_before_refreshing_next_session_admission(
|
||||
|
||||
allow_save.set()
|
||||
assert await asyncio.to_thread(disk_saved.wait, 5)
|
||||
# Disk can be committed while the route still owns a pending mutation;
|
||||
# admission uses the old snapshot until its synchronous refresh runs.
|
||||
assert not pending_save.done()
|
||||
assert disk_window() == 500_000
|
||||
assert (await admit("disk-committed-response-pending")).context_window_tokens == 100_000
|
||||
@@ -130,7 +125,6 @@ async def test_model_save_commits_before_refreshing_next_session_admission(
|
||||
assert next_preset.context_window_tokens == 500_000
|
||||
assert next_preset is not cached_preset
|
||||
assert agent.runtime_resolver.model_presets["chat"].context_window_tokens == 500_000
|
||||
# Refresh replaces admission values; already-admitted turns do not change.
|
||||
assert prior.context_window_tokens == during_save.context_window_tokens == 100_000
|
||||
assert cached_preset.context_window_tokens == 100_000
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user