test(perf): avoid codex hook runtime plan setup · openclaw/openclaw@3317b79
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
File tree
extensions/codex/src/app-server
| Original file line number | Diff line number | Diff line change |
|---|
@@ -81,6 +81,25 @@ function buildCodexRuntimePlan(params: EmbeddedRunAttemptParams, workspaceDir: s
|
81 | 81 | }); |
82 | 82 | } |
83 | 83 | |
| 84 | +function createCodexRuntimePlanFixture(): NonNullable<EmbeddedRunAttemptParams["runtimePlan"]> { |
| 85 | +return { |
| 86 | +auth: {}, |
| 87 | +observability: { |
| 88 | +resolvedRef: "codex/gpt-5.4-codex", |
| 89 | +provider: "codex", |
| 90 | +modelId: "gpt-5.4-codex", |
| 91 | +harnessId: "codex", |
| 92 | +}, |
| 93 | +prompt: { |
| 94 | +resolveSystemPromptContribution: () => undefined, |
| 95 | +}, |
| 96 | +tools: { |
| 97 | +normalize: (tools: unknown[]) => tools, |
| 98 | +logDiagnostics: () => undefined, |
| 99 | +}, |
| 100 | +} as unknown as NonNullable<EmbeddedRunAttemptParams["runtimePlan"]>; |
| 101 | +} |
| 102 | + |
84 | 103 | function threadStartResult(threadId = "thread-1") { |
85 | 104 | return { |
86 | 105 | thread: { |
@@ -933,7 +952,8 @@ describe("runCodexAppServerAttempt", () => {
|
933 | 952 | sessionManager.appendMessage(assistantMessage("existing context", Date.now())); |
934 | 953 | const harness = createStartedThreadHarness(); |
935 | 954 | |
936 | | -const params = createParamsWithRuntimePlan(sessionFile, workspaceDir); |
| 955 | +const params = createParams(sessionFile, workspaceDir); |
| 956 | +params.runtimePlan = createCodexRuntimePlanFixture(); |
937 | 957 | params.onAgentEvent = onRunAgentEvent; |
938 | 958 | const run = runCodexAppServerAttempt(params); |
939 | 959 | await harness.waitForMethod("turn/start"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。