From da00dea140d961f9c7711cd16de6e574a182778f Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Wed, 30 Sep 2026 14:17:42 -0700 Subject: [PATCH] fix: remove inherited compaction deadline from Work --- behaviors/work-local.yaml | 5 ++++- tests/test_composition.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/behaviors/work-local.yaml b/behaviors/work-local.yaml index 2f0a10c..1a17bd1 100644 --- a/behaviors/work-local.yaml +++ b/behaviors/work-local.yaml @@ -15,7 +15,10 @@ session: token_meter: actual summarize_trigger: 0.70 summary_target_tokens: 1500 - summary_timeout: 120 + # Healthy model work can take many minutes. Do not add a compaction + # deadline: the former 120-second limit cancelled large summaries and + # caused repeated retries. Completion, provider errors and user + # cancellation determine when a call ends, not elapsed time. tools: - module: tool-transcript diff --git a/tests/test_composition.py b/tests/test_composition.py index 18b68ad..02f14d7 100644 --- a/tests/test_composition.py +++ b/tests/test_composition.py @@ -7,6 +7,20 @@ ROOT = Path(__file__).resolve().parents[1] +@pytest.mark.asyncio +@pytest.mark.parametrize("source", ["bundle.md", "behaviors/work-local.yaml", + "bundles/work-session.yaml", "presets/anchors-work.md", "presets/work-images.md"]) +async def test_composed_work_does_not_impose_compaction_deadlines(tmp_path, monkeypatch, source): + monkeypatch.setenv("AMPLIFIER_HOME", str(tmp_path / "shared")) + monkeypatch.chdir(tmp_path) + bundle = await foundation.load_bundle(str(ROOT / source), strict=True) + config = bundle.session["context"]["config"] + # A bundle-level timer previously cancelled healthy large-history requests. + # Exercise composition so includes/presets cannot silently restore it. + for key in ("summary_timeout", "summary_total_work_timeout", "native_compaction_timeout"): + assert key not in config + + @pytest.mark.asyncio async def test_root_loads_from_an_unrelated_workspace(tmp_path, monkeypatch): monkeypatch.setenv("AMPLIFIER_HOME", str(tmp_path / "shared"))