test(codex): seed context-engine web search binding · openclaw/openclaw@d9d4da0
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
14 | 14 | import type { CodexAppServerClientFactory } from "./client-factory.js"; |
15 | 15 | import type { CodexServerNotification } from "./protocol.js"; |
16 | 16 | import { runCodexAppServerAttempt as runCodexAppServerAttemptImpl } from "./run-attempt.js"; |
17 | | -import { readCodexAppServerBinding, writeCodexAppServerBinding } from "./session-binding.js"; |
| 17 | +import { |
| 18 | +readCodexAppServerBinding, |
| 19 | +writeCodexAppServerBinding as writeRawCodexAppServerBinding, |
| 20 | +} from "./session-binding.js"; |
18 | 21 | import { createCodexTestModel } from "./test-support.js"; |
19 | 22 | |
20 | 23 | let tempDir: string; |
@@ -242,6 +245,23 @@ function createContextEngine(overrides: Partial<ContextEngine> = {}): ContextEng
|
242 | 245 | return engine; |
243 | 246 | } |
244 | 247 | |
| 248 | +const DISABLED_CODEX_WEB_SEARCH_THREAD_CONFIG_FINGERPRINT = JSON.stringify({ |
| 249 | +"features.standalone_web_search": false, |
| 250 | +web_search: "disabled", |
| 251 | +}); |
| 252 | + |
| 253 | +function writeCodexAppServerBinding(...args: Parameters<typeof writeRawCodexAppServerBinding>) { |
| 254 | +const [sessionFile, binding, lookup] = args; |
| 255 | +return writeRawCodexAppServerBinding( |
| 256 | +sessionFile, |
| 257 | +{ |
| 258 | +webSearchThreadConfigFingerprint: DISABLED_CODEX_WEB_SEARCH_THREAD_CONFIG_FINGERPRINT, |
| 259 | + ...binding, |
| 260 | +}, |
| 261 | +lookup, |
| 262 | +); |
| 263 | +} |
| 264 | + |
245 | 265 | type MockCallReader = { mock: { calls: unknown[][] } }; |
246 | 266 | |
247 | 267 | function requireRecord(value: unknown, label: string): Record<string, unknown> { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。