test(coding-agent): pinned plan-reference compaction window to 200k

claude-sonnet-4-5's bundled context window grew to 1M in the catalog regen, so the fixed 191k high-usage turn no longer crossed the ~85% auto-compaction threshold. The auto-continuation never fired and the three re-injection tests hung to their 5s timeout, failing the coding-agent runtime/session CI bucket and blocking the release.

Pin the harness model to a 200k window (mirrors agent-session-eager-compaction / -auto-compaction-queue), keeping the trigger stable across future catalog regenerations.
This commit is contained in:
can1357
2026-07-05 17:47:07 +02:00
parent 343ade685f
commit b914f552f6
@@ -133,8 +133,13 @@ describe("AgentSession approved-plan reference re-injection after compaction (is
resolve: (call: ObservedPromptCall) => void;
}> = [];
const model = getBundledModel("anthropic", "claude-sonnet-4-5");
if (!model) throw new Error("Expected claude-sonnet-4-5 model to exist");
const bundled = getBundledModel("anthropic", "claude-sonnet-4-5");
if (!bundled) throw new Error("Expected claude-sonnet-4-5 model to exist");
// Pin the context window so the fixed 191k high-usage turn stays above the
// compaction threshold across catalog regenerations: claude-sonnet-4-5's
// bundled window grew to 1M, which a 191k turn no longer trips. Mirrors
// agent-session-eager-compaction / -auto-compaction-queue.
const model = { ...bundled, contextWindow: 200_000, maxTokens: 64_000 };
const authStorage = await AuthStorage.create(path.join(tempDir.path(), `testauth-${cleanups.length}.db`));
authStorage.setRuntimeApiKey("anthropic", "test-key");