fix: trigger compaction on LLM timeout with high context usage (#46417)

Merged via squash.

Prepared head SHA: 619bc4c1fa
Co-authored-by: joeykrug <5925937+joeykrug@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
Joseph Krug
2026-03-25 15:51:36 -04:00
committed by GitHub
parent 1b3a1246d0
commit d81593c6e2
11 changed files with 843 additions and 81 deletions

View File

@@ -47,10 +47,10 @@ describe("runCommandWithTimeout", () => {
it("kills command when no output timeout elapses", async () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 10)"],
[process.execPath, "-e", "setTimeout(() => {}, 5_000)"],
{
timeoutMs: 30,
noOutputTimeoutMs: 4,
timeoutMs: 2_000,
noOutputTimeoutMs: 200,
},
);
@@ -61,9 +61,9 @@ describe("runCommandWithTimeout", () => {
it("reports global timeout termination when overall timeout elapses", async () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 10)"],
[process.execPath, "-e", "setTimeout(() => {}, 5_000)"],
{
timeoutMs: 4,
timeoutMs: 200,
},
);