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

推荐订阅源

Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
博客园_首页
T
Tailwind CSS Blog
美团技术团队
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog

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
test: tighten auth profile runtime assertions · openclaw/...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -11,6 +11,7 @@ import type { SessionEntry } from "../config/sessions.js";

1111

import type { OpenClawConfig } from "../config/types.openclaw.js";

1212

import type * as ManifestRegistryModule from "../plugins/manifest-registry.js";

1313

import { runAgentAttempt } from "./command/attempt-execution.js";

14+

import type { RunEmbeddedPiAgentParams } from "./pi-embedded-runner/run/params.js";

1415

import type { EmbeddedPiRunResult } from "./pi-embedded.js";

1516

import { resolveProviderIdForAuth } from "./provider-auth-aliases.js";

1617

@@ -68,6 +69,15 @@ vi.mock("./pi-embedded.js", () => ({

6869

runEmbeddedPiAgent: runEmbeddedPiAgentMock,

6970

}));

707172+

function capturedEmbeddedRunParams(): RunEmbeddedPiAgentParams {

73+

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

74+

const call = runEmbeddedPiAgentMock.mock.calls[0];

75+

if (!call) {

76+

throw new Error("expected runEmbeddedPiAgent to be called");

77+

}

78+

return call[0] as RunEmbeddedPiAgentParams;

79+

}

80+7181

function makeCliResult(text: string): EmbeddedPiRunResult {

7282

return {

7383

payloads: [{ text }],

@@ -377,10 +387,9 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

377387

});

378388379389

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

380-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

381-

provider: AUTH_PROFILE_RUNTIME_CONTRACT.openAiProvider,

382-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiProfileId,

383-

});

390+

const params = capturedEmbeddedRunParams();

391+

expect(params.provider).toBe(AUTH_PROFILE_RUNTIME_CONTRACT.openAiProvider);

392+

expect(params.authProfileId).toBe(AUTH_PROFILE_RUNTIME_CONTRACT.openAiProfileId);

384393

});

385394386395

it("forwards an OpenAI Codex auth profile through the default OpenAI Codex harness path", async () => {

@@ -393,9 +402,9 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

393402

});

394403395404

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

396-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

397-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

398-

});

405+

expect(capturedEmbeddedRunParams().authProfileId).toBe(

406+

AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

407+

);

399408

});

400409401410

it("routes explicit OpenAI PI runs with Codex OAuth through OpenAI Codex transport", async () => {

@@ -409,10 +418,9 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

409418

});

410419411420

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

412-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

413-

provider: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProvider,

414-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

415-

});

421+

const params = capturedEmbeddedRunParams();

422+

expect(params.provider).toBe(AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProvider);

423+

expect(params.authProfileId).toBe(AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId);

416424

});

417425418426

it("preserves OpenAI Codex auth profiles through the real codex/* harness startup path", async () => {

@@ -426,9 +434,9 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

426434

});

427435428436

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

429-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

430-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

431-

});

437+

expect(capturedEmbeddedRunParams().authProfileId).toBe(

438+

AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

439+

);

432440

});

433441434442

it("validates openai/* forced through the Codex harness can use OpenAI Codex OAuth profiles", async () => {

@@ -442,9 +450,9 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

442450

});

443451444452

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

445-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

446-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

447-

});

453+

expect(capturedEmbeddedRunParams().authProfileId).toBe(

454+

AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

455+

);

448456

});

449457450458

it("preserves configured Codex harness when a skeleton session entry is considered history", async () => {

@@ -459,8 +467,8 @@ describe("Auth profile runtime contract - Pi and CLI adapter", () => {

459467

});

460468461469

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

462-

expect(runEmbeddedPiAgentMock.mock.calls[0]?.[0]).toMatchObject({

463-

authProfileId: AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

464-

});

470+

expect(capturedEmbeddedRunParams().authProfileId).toBe(

471+

AUTH_PROFILE_RUNTIME_CONTRACT.openAiCodexProfileId,

472+

);

465473

});

466474

});