mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-06 15:18:58 +00:00
test(perf): avoid codex hook runtime plan setup
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user