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

推荐订阅源

H
Help Net Security
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
博客园_首页
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
B
Blog
D
DataBreaches.Net
腾讯CDC
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
月光博客
月光博客
V
V2EX
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
The Cloudflare Blog
博客园 - 叶小钗
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
fix(status): restore Codex synthetic usage in status · op...
brokemac79 · 2026-06-26 · via Recent Commits to openclaw:main

@@ -957,6 +957,8 @@ describe("buildStatusReply subagent summary", () => {

957957

OPENAI_API_KEY: undefined,

958958

OPENAI_OAUTH_TOKEN: undefined,

959959

},

960+

skipSessionCleanup: true,

961+

skipHomeCleanup: true,

960962

},

961963

);

962964

});

@@ -1042,6 +1044,8 @@ describe("buildStatusReply subagent summary", () => {

10421044

OPENAI_API_KEY: undefined,

10431045

OPENAI_OAUTH_TOKEN: undefined,

10441046

},

1047+

skipSessionCleanup: true,

1048+

skipHomeCleanup: true,

10451049

},

10461050

);

10471051

});

@@ -1066,66 +1070,69 @@ describe("buildStatusReply subagent summary", () => {

10661070

],

10671071

});

106810721069-

await withTempHome(async (dir) => {

1070-

saveStatusTestAuthProfile({ dir, profileId: "work", provider: "openai" });

1073+

await withTempHome(

1074+

async (dir) => {

1075+

saveStatusTestAuthProfile({ dir, profileId: "work", provider: "openai" });

107110761072-

const text = await buildStatusText({

1073-

cfg: {

1074-

...baseCfg,

1075-

agents: {

1076-

defaults: {

1077-

agentRuntime: { id: "codex" },

1077+

const text = await buildStatusText({

1078+

cfg: {

1079+

...baseCfg,

1080+

agents: {

1081+

defaults: {

1082+

agentRuntime: { id: "codex" },

1083+

},

10781084

},

10791085

},

1080-

},

1081-

sessionEntry: {

1082-

sessionId: "sess-status-codex-synthetic-usage",

1083-

updatedAt: 0,

1084-

authProfileOverride: "work",

1085-

},

1086-

sessionKey: "agent:main:main",

1087-

parentSessionKey: "agent:main:main",

1088-

sessionScope: "per-sender",

1089-

statusChannel: "mobilechat",

1090-

provider: "openai",

1091-

model: "gpt-5.5",

1092-

contextTokens: 32_000,

1093-

resolvedFastMode: false,

1094-

resolvedVerboseLevel: "off",

1095-

resolvedReasoningLevel: "off",

1096-

resolveDefaultThinkingLevel: async () => undefined,

1097-

isGroup: false,

1098-

defaultGroupActivation: () => "mention",

1099-

modelAuthOverride: "oauth",

1100-

activeModelAuthOverride: "oauth",

1101-

});

1102-1103-

const normalized = normalizeTestText(text);

1104-

expect(normalized).toContain("Model: openai/gpt-5.5");

1105-

expect(normalized).toContain("Runtime: OpenAI Codex");

1106-

expect(normalized).toContain("Usage: 5h 91% left");

1107-

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

1108-

([params]) => params?.providers?.includes("openai"),

1109-

);

1110-

if (!providerUsageCall) {

1111-

throw new Error("expected provider usage summary call for synthetic Codex auth");

1112-

}

1113-

expect(providerUsageCall[0]).toMatchObject({

1114-

timeoutMs: 8000,

1115-

providers: ["openai"],

1116-

auth: [

1117-

{

1118-

...expectedCodexRuntimeUsageAuth[0],

1119-

authProfileId: "work",

1086+

sessionEntry: {

1087+

sessionId: "sess-status-codex-synthetic-usage",

1088+

updatedAt: 0,

1089+

authProfileOverride: "work",

11201090

},

1121-

],

1122-

config: expect.objectContaining({

1123-

agents: expect.objectContaining({

1124-

defaults: expect.objectContaining({ agentRuntime: { id: "codex" } }),

1091+

sessionKey: "agent:main:main",

1092+

parentSessionKey: "agent:main:main",

1093+

sessionScope: "per-sender",

1094+

statusChannel: "mobilechat",

1095+

provider: "openai",

1096+

model: "gpt-5.5",

1097+

contextTokens: 32_000,

1098+

resolvedFastMode: false,

1099+

resolvedVerboseLevel: "off",

1100+

resolvedReasoningLevel: "off",

1101+

resolveDefaultThinkingLevel: async () => undefined,

1102+

isGroup: false,

1103+

defaultGroupActivation: () => "mention",

1104+

modelAuthOverride: "oauth",

1105+

activeModelAuthOverride: "oauth",

1106+

});

1107+1108+

const normalized = normalizeTestText(text);

1109+

expect(normalized).toContain("Model: openai/gpt-5.5");

1110+

expect(normalized).toContain("Runtime: OpenAI Codex");

1111+

expect(normalized).toContain("Usage: 5h 91% left");

1112+

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

1113+

([params]) => params?.providers?.includes("openai"),

1114+

);

1115+

if (!providerUsageCall) {

1116+

throw new Error("expected provider usage summary call for synthetic Codex auth");

1117+

}

1118+

expect(providerUsageCall[0]).toMatchObject({

1119+

timeoutMs: 8000,

1120+

providers: ["openai"],

1121+

auth: [

1122+

{

1123+

...expectedCodexRuntimeUsageAuth[0],

1124+

authProfileId: "work",

1125+

},

1126+

],

1127+

config: expect.objectContaining({

1128+

agents: expect.objectContaining({

1129+

defaults: expect.objectContaining({ agentRuntime: { id: "codex" } }),

1130+

}),

11251131

}),

1126-

}),

1127-

});

1128-

});

1132+

});

1133+

},

1134+

{ skipSessionCleanup: true, skipHomeCleanup: true },

1135+

);

11291136

});

1130113711311138

it("forwards legacy Codex profile providers to Codex synthetic usage", async () => {

@@ -1141,14 +1148,74 @@ describe("buildStatusReply subagent summary", () => {

11411148

],

11421149

});

114311501144-

await withTempHome(async (dir) => {

1145-

saveStatusTestAuthProfile({

1146-

dir,

1147-

profileId: "openai-codex:legacy",

1148-

provider: "openai-codex",

1149-

});

1151+

await withTempHome(

1152+

async (dir) => {

1153+

saveStatusTestAuthProfile({

1154+

dir,

1155+

profileId: "openai-codex:legacy",

1156+

provider: "openai-codex",

1157+

});

115011581151-

await buildStatusText({

1159+

await buildStatusText({

1160+

cfg: {

1161+

...baseCfg,

1162+

agents: {

1163+

defaults: {

1164+

agentRuntime: { id: "codex" },

1165+

},

1166+

},

1167+

},

1168+

sessionEntry: {

1169+

sessionId: "sess-status-codex-legacy-profile",

1170+

updatedAt: 0,

1171+

authProfileOverride: "openai-codex:legacy",

1172+

},

1173+

sessionKey: "agent:main:main",

1174+

parentSessionKey: "agent:main:main",

1175+

sessionScope: "per-sender",

1176+

statusChannel: "mobilechat",

1177+

provider: "openai",

1178+

model: "gpt-5.5",

1179+

contextTokens: 32_000,

1180+

resolvedFastMode: false,

1181+

resolvedVerboseLevel: "off",

1182+

resolvedReasoningLevel: "off",

1183+

resolveDefaultThinkingLevel: async () => undefined,

1184+

isGroup: false,

1185+

defaultGroupActivation: () => "mention",

1186+

modelAuthOverride: "oauth",

1187+

activeModelAuthOverride: "oauth",

1188+

});

1189+1190+

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

1191+

([params]) => params?.providers?.includes("openai"),

1192+

);

1193+

expect(providerUsageCall?.[0]?.auth).toEqual([

1194+

{

1195+

...expectedCodexRuntimeUsageAuth[0],

1196+

authProfileId: "openai-codex:legacy",

1197+

},

1198+

]);

1199+

},

1200+

{ skipSessionCleanup: true, skipHomeCleanup: true },

1201+

);

1202+

});

1203+1204+

it("loads Codex synthetic usage when no local OpenAI profile label exists", async () => {

1205+

registerStatusCodexHarness();

1206+

providerUsageMock.loadProviderUsageSummary.mockResolvedValue({

1207+

updatedAt: Date.now(),

1208+

providers: [

1209+

{

1210+

provider: "openai",

1211+

displayName: "OpenAI",

1212+

windows: [{ label: "5h", usedPercent: 16 }],

1213+

},

1214+

],

1215+

});

1216+1217+

await withTempHome(async () => {

1218+

const text = await buildStatusText({

11521219

cfg: {

11531220

...baseCfg,

11541221

agents: {

@@ -1158,9 +1225,8 @@ describe("buildStatusReply subagent summary", () => {

11581225

},

11591226

},

11601227

sessionEntry: {

1161-

sessionId: "sess-status-codex-legacy-profile",

1228+

sessionId: "sess-status-codex-no-profile",

11621229

updatedAt: 0,

1163-

authProfileOverride: "openai-codex:legacy",

11641230

},

11651231

sessionKey: "agent:main:main",

11661232

parentSessionKey: "agent:main:main",

@@ -1175,19 +1241,13 @@ describe("buildStatusReply subagent summary", () => {

11751241

resolveDefaultThinkingLevel: async () => undefined,

11761242

isGroup: false,

11771243

defaultGroupActivation: () => "mention",

1178-

modelAuthOverride: "oauth",

1179-

activeModelAuthOverride: "oauth",

11801244

});

118112451246+

expect(normalizeTestText(text)).toContain("Usage: 5h 84% left");

11821247

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

11831248

([params]) => params?.providers?.includes("openai"),

11841249

);

1185-

expect(providerUsageCall?.[0]?.auth).toEqual([

1186-

{

1187-

...expectedCodexRuntimeUsageAuth[0],

1188-

authProfileId: "openai-codex:legacy",

1189-

},

1190-

]);

1250+

expect(providerUsageCall?.[0]?.auth).toEqual(expectedCodexRuntimeUsageAuth);

11911251

});

11921252

});

11931253

@@ -1204,49 +1264,52 @@ describe("buildStatusReply subagent summary", () => {

12041264

],

12051265

});

120612661207-

await withTempHome(async (dir) => {

1208-

saveStatusTestAuthProfiles({

1209-

dir,

1210-

profiles: [

1211-

{ profileId: "openai:status", provider: "openai" },

1212-

{ profileId: "anthropic:work", provider: "anthropic" },

1213-

],

1214-

});

1267+

await withTempHome(

1268+

async (dir) => {

1269+

saveStatusTestAuthProfiles({

1270+

dir,

1271+

profiles: [

1272+

{ profileId: "openai:status", provider: "openai" },

1273+

{ profileId: "anthropic:work", provider: "anthropic" },

1274+

],

1275+

});

121512761216-

await buildStatusText({

1217-

cfg: {

1218-

...baseCfg,

1219-

agents: {

1220-

defaults: {

1221-

agentRuntime: { id: "codex" },

1277+

await buildStatusText({

1278+

cfg: {

1279+

...baseCfg,

1280+

agents: {

1281+

defaults: {

1282+

agentRuntime: { id: "codex" },

1283+

},

12221284

},

12231285

},

1224-

},

1225-

sessionEntry: {

1226-

sessionId: "sess-status-codex-stale-profile",

1227-

updatedAt: 0,

1228-

authProfileOverride: "anthropic:work",

1229-

},

1230-

sessionKey: "agent:main:main",

1231-

parentSessionKey: "agent:main:main",

1232-

sessionScope: "per-sender",

1233-

statusChannel: "mobilechat",

1234-

provider: "openai",

1235-

model: "gpt-5.5",

1236-

contextTokens: 32_000,

1237-

resolvedFastMode: false,

1238-

resolvedVerboseLevel: "off",

1239-

resolvedReasoningLevel: "off",

1240-

resolveDefaultThinkingLevel: async () => undefined,

1241-

isGroup: false,

1242-

defaultGroupActivation: () => "mention",

1243-

});

1286+

sessionEntry: {

1287+

sessionId: "sess-status-codex-stale-profile",

1288+

updatedAt: 0,

1289+

authProfileOverride: "anthropic:work",

1290+

},

1291+

sessionKey: "agent:main:main",

1292+

parentSessionKey: "agent:main:main",

1293+

sessionScope: "per-sender",

1294+

statusChannel: "mobilechat",

1295+

provider: "openai",

1296+

model: "gpt-5.5",

1297+

contextTokens: 32_000,

1298+

resolvedFastMode: false,

1299+

resolvedVerboseLevel: "off",

1300+

resolvedReasoningLevel: "off",

1301+

resolveDefaultThinkingLevel: async () => undefined,

1302+

isGroup: false,

1303+

defaultGroupActivation: () => "mention",

1304+

});

124413051245-

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

1246-

([params]) => params?.providers?.includes("openai"),

1247-

);

1248-

expect(providerUsageCall?.[0]?.auth).toEqual(expectedCodexRuntimeUsageAuth);

1249-

});

1306+

const providerUsageCall = providerUsageMock.loadProviderUsageSummary.mock.calls.find(

1307+

([params]) => params?.providers?.includes("openai"),

1308+

);

1309+

expect(providerUsageCall?.[0]?.auth).toEqual(expectedCodexRuntimeUsageAuth);

1310+

},

1311+

{ skipSessionCleanup: true, skipHomeCleanup: true },

1312+

);

12501313

});

1251131412521315

it("uses active fallback provider usage for legacy fallback notices", async () => {

@@ -1751,7 +1814,7 @@ describe("buildStatusReply subagent summary", () => {

17511814

expect(normalized).toContain("oauth (openai:status)");

17521815

expect(normalized).not.toContain("api-key (openai:backup)");

17531816

},

1754-

{ env: { OPENAI_API_KEY: undefined } },

1817+

{ env: { OPENAI_API_KEY: undefined }, skipSessionCleanup: true, skipHomeCleanup: true },

17551818

);

17561819

});

17571820