From 9b925e141d22108be1d6f6b9cda73300f58825ea Mon Sep 17 00:00:00 2001 From: kami Date: Mon, 13 Jul 2026 12:12:19 +0400 Subject: [PATCH] test(gate): expect uniform tool-result frame in compressed-context assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tool-output framing feature (2912799f) wraps every tool result in a '[tool exit=N]' header before it enters context. Compression still runs (blank lines stripped); the test predated the frame and asserted the bare compressed body. Update to the framed contract — invariant #6 unchanged. --- testing/integration/src/test/kotlin/ToolCallGateTest.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testing/integration/src/test/kotlin/ToolCallGateTest.kt b/testing/integration/src/test/kotlin/ToolCallGateTest.kt index 0316e493..1299e954 100644 --- a/testing/integration/src/test/kotlin/ToolCallGateTest.kt +++ b/testing/integration/src/test/kotlin/ToolCallGateTest.kt @@ -377,11 +377,12 @@ class ToolCallGateTest { orchestrator.run(SessionId("compress"), singleStageGraph(), config) // The second inference carries round-1's tool result in its context pack — compressed - // (blank lines stripped), not raw. Raw output stays authoritative on the executor's - // event path (invariant #6); the compressor only shapes the derived context entry. + // (blank lines stripped), not raw, under the uniform `[tool exit=N]` frame the model sees. + // Raw output stays authoritative on the executor's event path (invariant #6); the compressor + // only shapes the derived context entry. val secondPack = provider.requests[1].contextPack val toolEntry = secondPack.layers.values.flatten().first { it.sourceType == "toolResult" } - assertEquals("line1\nline2\nline3", toolEntry.content) + assertEquals("[file_write exit=0]\nline1\nline2\nline3", toolEntry.content) } @Test