Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Canonical _truncate must tolerate non-string input (regression).
Originally this tested mcp_servers/_common.py's copy, which was deleted
since it had zero callers. Now it tests the canonical version.
"""
from src.tool_utils import _truncate
def test_truncate_handles_none_and_nonstring():
assert _truncate(None) == "" # pyright: ignore[reportArgumentType]
assert _truncate(12345) == "12345" # pyright: ignore[reportArgumentType]
def test_truncate_string_behaviour_unchanged():
assert _truncate("hello", limit=100) == "hello"
out = _truncate("x" * 50, limit=10)
assert out.startswith("x" * 10) and "truncated" in out