test(perf): avoid codex hook runtime plan setup

This commit is contained in:
Peter Steinberger
2026-05-06 13:40:12 +01:00
parent 20906f56e2
commit 3317b79e5f

View File

@@ -81,6 +81,25 @@ function buildCodexRuntimePlan(params: EmbeddedRunAttemptParams, workspaceDir: s
});
}
function createCodexRuntimePlanFixture(): NonNullable<EmbeddedRunAttemptParams["runtimePlan"]> {
return {
auth: {},
observability: {
resolvedRef: "codex/gpt-5.4-codex",
provider: "codex",
modelId: "gpt-5.4-codex",
harnessId: "codex",
},
prompt: {
resolveSystemPromptContribution: () => undefined,
},
tools: {
normalize: (tools: unknown[]) => tools,
logDiagnostics: () => undefined,
},
} as unknown as NonNullable<EmbeddedRunAttemptParams["runtimePlan"]>;
}
function threadStartResult(threadId = "thread-1") {
return {
thread: {
@@ -933,7 +952,8 @@ describe("runCodexAppServerAttempt", () => {
sessionManager.appendMessage(assistantMessage("existing context", Date.now()));
const harness = createStartedThreadHarness();
const params = createParamsWithRuntimePlan(sessionFile, workspaceDir);
const params = createParams(sessionFile, workspaceDir);
params.runtimePlan = createCodexRuntimePlanFixture();
params.onAgentEvent = onRunAgentEvent;
const run = runCodexAppServerAttempt(params);
await harness.waitForMethod("turn/start");