Skip to content

The agent that grows with you

test(gateway): split managed-worker compress rows into their own file

Tekniumb1c9be8f40cf
diff --git a/tests/gateway/test_session_mutation_compress.py b/tests/gateway/test_session_mutation_compress.py
index 25192970d32..8a04710b2fe 100644
--- a/tests/gateway/test_session_mutation_compress.py
+++ b/tests/gateway/test_session_mutation_compress.py
@@ -35,10 +35,15 @@ class SummaryModel(CatalogModel):
self.wfile.write(payload)
[email protected](('mode', 'in_place'), [
- ('normal', True), ('normal', False), ('managed', True), ('managed', False), ('safe', None),
-])
+# The managed_workers=True rows live in test_session_mutation_compress_managed.py: every turn
+# spawns a fresh agent.managed_worker interpreter (~5-7 s x 17 turns per row), and all five rows
+# in one file ran ~360 s, over the per-file cap.
[email protected](('mode', 'in_place'), [('normal', True), ('normal', False), ('safe', None)])
def test_compress_preserves_configured_history_and_admission_owner(tmp_path, mode, in_place):
+ run_compress_case(tmp_path, mode, in_place)
+
+
+def run_compress_case(tmp_path, mode, in_place):
root = Path(__file__).resolve().parents[2]
home, user = tmp_path / 'state', tmp_path / 'user'
home.mkdir(mode=0o700)
diff --git a/tests/gateway/test_session_mutation_compress_managed.py b/tests/gateway/test_session_mutation_compress_managed.py
new file mode 100644
index 00000000000..6342d5798a5
--- /dev/null
+++ b/tests/gateway/test_session_mutation_compress_managed.py
@@ -0,0 +1,9 @@
+"""Real summary preparation under the managed_workers opt-in: each turn runs out of process."""
+import pytest
+
+from tests.gateway.test_session_mutation_compress import run_compress_case
+
+
[email protected]('in_place', [True, False])
+def test_managed_compress_preserves_configured_history_and_admission_owner(tmp_path, in_place):
+ run_compress_case(tmp_path, 'managed', in_place)