fix: preserve existing thresholds, remove pre-read byte guard

- DEFAULT_RESULT_SIZE_CHARS: 50K -> 100K (match current _LARGE_RESULT_CHARS)
- DEFAULT_PREVIEW_SIZE_CHARS: 2K -> 1.5K (match current _LARGE_RESULT_PREVIEW_CHARS)
- Per-tool overrides all set to 100K (terminal, execute_code, search_files)
- Remove pre-read byte guard (no behavioral regression vs current main)
- Revert limit signature change to int=500 (match current default)
- Restore original read_file schema description
- Update test assertions to match 100K thresholds
This commit is contained in:
Teknium
2026-04-08 01:45:51 -07:00
committed by Teknium
parent bbcff8dcd0
commit 3696c74bfb
5 changed files with 11 additions and 35 deletions

View File

@@ -395,7 +395,7 @@ class TestEnforceTurnBudget:
assert PERSISTED_OUTPUT_TAG in msgs[1]["content"]
def test_medium_result_regression(self):
"""6 results of 42K chars each (252K total) — each under 50K default
"""6 results of 42K chars each (252K total) — each under 100K default
threshold but aggregate exceeds 200K budget. L3 should persist."""
env = MagicMock()
env.execute.return_value = {"output": "", "returncode": 0}
@@ -449,7 +449,7 @@ class TestPerToolThresholds:
try:
import tools.terminal_tool # noqa: F401
val = registry.get_max_result_size("terminal")
assert val == 30_000
assert val == 100_000
except ImportError:
pytest.skip("terminal_tool not importable in test env")
@@ -467,6 +467,6 @@ class TestPerToolThresholds:
try:
import tools.file_tools # noqa: F401
val = registry.get_max_result_size("search_files")
assert val == 20_000
assert val == 100_000
except ImportError:
pytest.skip("file_tools not importable in test env")