Skip to content

Commit 80dfd41

Browse files
committed
test(core): pin background shell path outside the output bound
1 parent 8799179 commit 80dfd41

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎packages/core/test/session-runner-message.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,4 +1310,19 @@ Earlier work
13101310
expect(text).not.toContain("�")
13111311
expect(text).toContain("[truncated:")
13121312
})
1313+
1314+
test("background shell results bypass the bound through their completion path", () => {
1315+
const output = `head-${"a".repeat(60 * 1024)}-TAIL`
1316+
const shell = SessionMessage.Shell.make({
1317+
id: id("background-large"),
1318+
type: "shell",
1319+
shellID: Shell.ID.make("sh_background_large"),
1320+
status: "exited",
1321+
command: "bun typecheck",
1322+
metadata: { background: true },
1323+
output: { output, cursor: output.length, size: output.length, truncated: false },
1324+
time: { created },
1325+
})
1326+
expect(toLLMMessages([shell], model)).toEqual([])
1327+
})
13131328
})

0 commit comments

Comments
 (0)