The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: assert the newest record token directly in lean sampling test
kshitijk4poor3339255abed6
diff --git a/tests/agent/test_lean_single_aux_call.py b/tests/agent/test_lean_single_aux_call.pyindex 17a5bee1c1e..02ec5d6553a 100644--- a/tests/agent/test_lean_single_aux_call.py+++ b/tests/agent/test_lean_single_aux_call.py@@ -152,7 +152,6 @@ class TestSampledSummaryInput:# Distinct decade markers let us verify oldest-to-newest order and# uniform coverage across the whole region.records = [f"<seg{i:02d}>" + ("x" * 50_000) for i in range(10)]- content = "\n\n".join(records)out, _coverage = ContextCompressor._sample_summary_records(records)assert len(out) <= ContextCompressor._SUMMARY_INPUT_MAX_CHARSassert "chars elided" in out@@ -160,7 +159,8 @@ class TestSampledSummaryInput:# Coverage reaches past the head AND includes the newest end.assert seen == sorted(seen)assert any(i >= 5 for i in seen)- assert ("<seg09>" in out) or (content[-500:] in out)+ # The newest record anchors the last slice, so its token must be present outright.+ assert "<seg09>" in outdef test_legacy_mode_keeps_head_tail_bound(self):c = _mk_compressor(tail_mode="legacy")