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

推荐订阅源

D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
IT之家
IT之家
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research

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 assertions · openclaw/openclaw...
steipete · 2026-05-09 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -59,18 +59,18 @@ describe("auth profiles read-only external auth overlay", () => {

5959

const loaded = loadAuthProfileStoreForRuntime(agentDir, { readOnly: true });

6060
6161

expect(resolveExternalAuthProfilesWithPluginsMock).toHaveBeenCalled();

62-

expect(loaded.profiles["minimax-portal:default"]).toMatchObject({

63-

type: "oauth",

64-

provider: "minimax-portal",

65-

});

62+

expect(loaded.profiles["minimax-portal:default"]?.type).toBe("oauth");

63+

expect(loaded.profiles["minimax-portal:default"]?.provider).toBe("minimax-portal");

6664
6765

const persisted = JSON.parse(fs.readFileSync(authPath, "utf8")) as AuthProfileStore;

6866

expect(persisted.profiles["minimax-portal:default"]).toBeUndefined();

69-

expect(persisted.profiles["openai:default"]).toMatchObject({

70-

type: "api_key",

71-

provider: "openai",

72-

key: "sk-test",

73-

});

67+

const persistedOpenAiProfile = persisted.profiles["openai:default"];

68+

expect(persistedOpenAiProfile?.type).toBe("api_key");

69+

if (persistedOpenAiProfile?.type !== "api_key") {

70+

throw new Error("expected persisted OpenAI API key profile");

71+

}

72+

expect(persistedOpenAiProfile.provider).toBe("openai");

73+

expect(persistedOpenAiProfile.key).toBe("sk-test");

7474

} finally {

7575

fs.rmSync(agentDir, { recursive: true, force: true });

7676

}

Original file line numberDiff line numberDiff line change

@@ -33,17 +33,18 @@ describe("overlayRuntimeExternalOAuthProfiles", () => {

3333

},

3434

]);

3535
36-

expect(overlaid.profiles["openai-codex:default"]).toMatchObject({

37-

access: "access-1",

38-

});

36+

const overlaidCodexProfile = overlaid.profiles["openai-codex:default"];

37+

expect(overlaidCodexProfile?.type).toBe("oauth");

38+

if (overlaidCodexProfile?.type !== "oauth") {

39+

throw new Error("expected overlaid Codex OAuth profile");

40+

}

41+

expect(overlaidCodexProfile.access).toBe("access-1");

3942

expect(store.profiles["openai-codex:default"]).toBeUndefined();

4043
4144

overlaid.profiles["openai:default"].provider = "mutated";

4245

overlaid.order!.openai.push("mutated");

4346
44-

expect(store.profiles["openai:default"]).toMatchObject({

45-

provider: "openai",

46-

});

47+

expect(store.profiles["openai:default"]?.provider).toBe("openai");

4748

expect(store.order?.openai).toEqual(["openai:default"]);

4849

expect(structuredCloneSpy).not.toHaveBeenCalled();

4950

} finally {

Original file line numberDiff line numberDiff line change

@@ -890,18 +890,14 @@ describe("markAuthProfileFailure — WHAM-aware Codex cooldowns", () => {

890890

await markCodexFailureAt({ store, now });

891891
892892

expect(fetchMock).toHaveBeenCalledTimes(1);

893-

expect(fetchMock).toHaveBeenCalledWith(

894-

"https://chatgpt.com/backend-api/wham/usage",

895-

expect.objectContaining({

896-

method: "GET",

897-

headers: expect.objectContaining({

898-

Authorization: "Bearer codex-access-token",

899-

"ChatGPT-Account-Id": "acct_test_123",

900-

originator: "openclaw",

901-

"User-Agent": expect.stringMatching(/^openclaw\//),

902-

}),

903-

}),

904-

);

893+

const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];

894+

expect(url).toBe("https://chatgpt.com/backend-api/wham/usage");

895+

expect(init.method).toBe("GET");

896+

const headers = init.headers as Record<string, string>;

897+

expect(headers.Authorization).toBe("Bearer codex-access-token");

898+

expect(headers["ChatGPT-Account-Id"]).toBe("acct_test_123");

899+

expect(headers.originator).toBe("openclaw");

900+

expect(headers["User-Agent"]).toMatch(/^openclaw\//);

905901

expect(store.usageStats?.["openai-codex:default"]?.cooldownUntil).toBe(now + expectedMs);

906902

});

907903