惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
L
LangChain Blog
WordPress大学
WordPress大学
A
About on SuperTechFans
Martin Fowler
Martin Fowler
月光博客
月光博客
Y
Y Combinator Blog
U
Unit 42
D
Docker
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(agents): fall back to PI when Codex harness is unavai...
steipete · 2026-05-16 · via Recent Commits to openclaw:main

@@ -913,6 +913,88 @@ describe("CLI attempt execution", () => {

913913

});

914914

});

915915916+

it("forwards user-pinned OpenAI API-key backup profiles to Codex harness runs", async () => {

917+

const { clearAgentHarnesses, registerAgentHarness } = await import("../harness/registry.js");

918+

const sessionKey = "agent:main:direct:openai-codex-api-key";

919+

const sessionEntry: SessionEntry = {

920+

sessionId: "openclaw-session-openai-codex-api-key",

921+

updatedAt: Date.now(),

922+

authProfileOverride: "openai:backup",

923+

authProfileOverrideSource: "user",

924+

};

925+

const sessionStore: Record<string, SessionEntry> = { [sessionKey]: sessionEntry };

926+

await fs.writeFile(storePath, JSON.stringify(sessionStore, null, 2), "utf-8");

927+

await fs.writeFile(

928+

path.join(tmpDir, "auth-profiles.json"),

929+

JSON.stringify(

930+

{

931+

version: 1,

932+

profiles: {

933+

"openai:backup": {

934+

type: "api_key",

935+

provider: "openai",

936+

key: "sk-test",

937+

},

938+

},

939+

},

940+

null,

941+

2,

942+

),

943+

"utf-8",

944+

);

945+

clearAgentHarnesses();

946+

registerAgentHarness({

947+

id: "codex",

948+

label: "Codex",

949+

supports: () => ({ supported: true, priority: 100 }),

950+

runAttempt: vi.fn(),

951+

});

952+

runEmbeddedPiAgentMock.mockResolvedValueOnce({

953+

meta: { durationMs: 1 },

954+

} satisfies EmbeddedPiRunResult);

955+956+

try {

957+

await runAgentAttempt({

958+

providerOverride: "openai",

959+

originalProvider: "openai",

960+

modelOverride: "gpt-5.4",

961+

cfg: {} as OpenClawConfig,

962+

sessionEntry,

963+

sessionId: sessionEntry.sessionId,

964+

sessionKey,

965+

sessionAgentId: "main",

966+

sessionFile: path.join(tmpDir, "session.jsonl"),

967+

workspaceDir: tmpDir,

968+

body: "use backup auth",

969+

isFallbackRetry: false,

970+

resolvedThinkLevel: "medium",

971+

timeoutMs: 1_000,

972+

runId: "run-openai-codex-api-key-backup",

973+

opts: { senderIsOwner: false } as Parameters<typeof runAgentAttempt>[0]["opts"],

974+

runContext: {} as Parameters<typeof runAgentAttempt>[0]["runContext"],

975+

spawnedBy: undefined,

976+

messageChannel: undefined,

977+

skillsSnapshot: undefined,

978+

resolvedVerboseLevel: undefined,

979+

agentDir: tmpDir,

980+

onAgentEvent: vi.fn(),

981+

authProfileProvider: "openai",

982+

sessionStore,

983+

storePath,

984+

sessionHasHistory: false,

985+

});

986+

} finally {

987+

clearAgentHarnesses();

988+

}

989+990+

expectMockArgFields(runEmbeddedPiAgentMock, {

991+

provider: "openai",

992+

model: "gpt-5.4",

993+

authProfileId: "openai:backup",

994+

authProfileIdSource: "user",

995+

});

996+

});

997+916998

it("keeps one-shot model runs on the raw embedded provider path", async () => {

917999

const sessionKey = "agent:main:direct:model-run-raw";

9181000

const sessionEntry: SessionEntry = {

@@ -1283,6 +1365,7 @@ describe("embedded attempt harness pinning", () => {

12831365

});

1284136612851367

it("auto-forwards OpenAI Codex auth profiles to default Codex harness runs", async () => {

1368+

const { clearAgentHarnesses, registerAgentHarness } = await import("../harness/registry.js");

12861369

const sessionEntry: SessionEntry = {

12871370

sessionId: "codex-auth-session",

12881371

updatedAt: Date.now(),

@@ -1305,35 +1388,46 @@ describe("embedded attempt harness pinning", () => {

13051388

runEmbeddedPiAgentMock.mockResolvedValueOnce({

13061389

meta: { durationMs: 1 },

13071390

} satisfies EmbeddedPiRunResult);

1308-1309-

await runAgentAttempt({

1310-

providerOverride: "openai",

1311-

originalProvider: "openai",

1312-

modelOverride: "gpt-5.4",

1313-

cfg: {} as OpenClawConfig,

1314-

sessionEntry,

1315-

sessionId: sessionEntry.sessionId,

1316-

sessionKey: "agent:main:main",

1317-

sessionAgentId: "main",

1318-

sessionFile: path.join(tmpDir, "session.jsonl"),

1319-

workspaceDir: tmpDir,

1320-

body: "continue",

1321-

isFallbackRetry: false,

1322-

resolvedThinkLevel: "medium",

1323-

timeoutMs: 1_000,

1324-

runId: "run-codex-auto-auth-profile",

1325-

opts: { senderIsOwner: false } as Parameters<typeof runAgentAttempt>[0]["opts"],

1326-

runContext: {} as Parameters<typeof runAgentAttempt>[0]["runContext"],

1327-

spawnedBy: undefined,

1328-

messageChannel: undefined,

1329-

skillsSnapshot: undefined,

1330-

resolvedVerboseLevel: undefined,

1331-

agentDir: tmpDir,

1332-

onAgentEvent: vi.fn(),

1333-

authProfileProvider: "openai",

1334-

sessionHasHistory: true,

1391+

clearAgentHarnesses();

1392+

registerAgentHarness({

1393+

id: "codex",

1394+

label: "Codex",

1395+

supports: () => ({ supported: true, priority: 100 }),

1396+

runAttempt: vi.fn(),

13351397

});

133613981399+

try {

1400+

await runAgentAttempt({

1401+

providerOverride: "openai",

1402+

originalProvider: "openai",

1403+

modelOverride: "gpt-5.4",

1404+

cfg: {} as OpenClawConfig,

1405+

sessionEntry,

1406+

sessionId: sessionEntry.sessionId,

1407+

sessionKey: "agent:main:main",

1408+

sessionAgentId: "main",

1409+

sessionFile: path.join(tmpDir, "session.jsonl"),

1410+

workspaceDir: tmpDir,

1411+

body: "continue",

1412+

isFallbackRetry: false,

1413+

resolvedThinkLevel: "medium",

1414+

timeoutMs: 1_000,

1415+

runId: "run-codex-auto-auth-profile",

1416+

opts: { senderIsOwner: false } as Parameters<typeof runAgentAttempt>[0]["opts"],

1417+

runContext: {} as Parameters<typeof runAgentAttempt>[0]["runContext"],

1418+

spawnedBy: undefined,

1419+

messageChannel: undefined,

1420+

skillsSnapshot: undefined,

1421+

resolvedVerboseLevel: undefined,

1422+

agentDir: tmpDir,

1423+

onAgentEvent: vi.fn(),

1424+

authProfileProvider: "openai",

1425+

sessionHasHistory: true,

1426+

});

1427+

} finally {

1428+

clearAgentHarnesses();

1429+

}

1430+13371431

expectMockArgFields(runEmbeddedPiAgentMock, {

13381432

agentHarnessId: undefined,

13391433

authProfileId: "openai-codex:work",