test(gate): expect uniform tool-result frame in compressed-context assertion

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.
This commit is contained in:
2026-07-13 12:12:19 +04:00
parent 5d1f2ab360
commit 9b925e141d
@@ -377,11 +377,12 @@ class ToolCallGateTest {
orchestrator.run(SessionId("compress"), singleStageGraph(), config) orchestrator.run(SessionId("compress"), singleStageGraph(), config)
// The second inference carries round-1's tool result in its context pack — compressed // 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 // (blank lines stripped), not raw, under the uniform `[tool exit=N]` frame the model sees.
// event path (invariant #6); the compressor only shapes the derived context entry. // 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 secondPack = provider.requests[1].contextPack
val toolEntry = secondPack.layers.values.flatten().first { it.sourceType == "toolResult" } 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 @Test