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

推荐订阅源

D
Docker
Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
M
MIT News - Artificial intelligence
腾讯CDC
B
Blog RSS Feed
H
Help Net Security
J
Java Code Geeks
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
博客园_首页
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
博客园 - Franky
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 叶小钗
Martin Fowler
Martin Fowler

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
perf(core): trim reply and agent allocation churn · openc...
vincentkoc · 2026-05-07 · via Recent Commits to openclaw:main

@@ -262,28 +262,46 @@ export function buildAuthHealthSummary(params: {

262262

continue;

263263

}

264264265-

const oauthProfiles = provider.profiles.filter((p) => p.type === "oauth");

266-

const tokenProfiles = provider.profiles.filter((p) => p.type === "token");

267-

const apiKeyProfiles = provider.profiles.filter((p) => p.type === "api_key");

265+

let hasApiKeyProfile = false;

266+

let hasExpirableProfile = false;

267+

let hasExpiredOrMissing = false;

268+

let hasExpiring = false;

269+

let earliestExpiry: number | undefined;

270+

for (const profile of provider.profiles) {

271+

if (profile.type === "api_key") {

272+

hasApiKeyProfile = true;

273+

continue;

274+

}

275+

if (profile.type !== "oauth" && profile.type !== "token") {

276+

continue;

277+

}

278+

hasExpirableProfile = true;

279+

if (typeof profile.expiresAt === "number" && Number.isFinite(profile.expiresAt)) {

280+

earliestExpiry =

281+

earliestExpiry === undefined

282+

? profile.expiresAt

283+

: Math.min(earliestExpiry, profile.expiresAt);

284+

}

285+

if (profile.status === "expired" || profile.status === "missing") {

286+

hasExpiredOrMissing = true;

287+

} else if (profile.status === "expiring") {

288+

hasExpiring = true;

289+

}

290+

}

268291269-

const expirable = [...oauthProfiles, ...tokenProfiles];

270-

if (expirable.length === 0) {

271-

provider.status = apiKeyProfiles.length > 0 ? "static" : "missing";

292+

if (!hasExpirableProfile) {

293+

provider.status = hasApiKeyProfile ? "static" : "missing";

272294

continue;

273295

}

274296275-

const expiryCandidates = expirable

276-

.map((p) => p.expiresAt)

277-

.filter((v): v is number => typeof v === "number" && Number.isFinite(v));

278-

if (expiryCandidates.length > 0) {

279-

provider.expiresAt = Math.min(...expiryCandidates);

297+

if (earliestExpiry !== undefined) {

298+

provider.expiresAt = earliestExpiry;

280299

provider.remainingMs = provider.expiresAt - now;

281300

}

282301283-

const statuses = new Set(expirable.map((p) => p.status));

284-

if (statuses.has("expired") || statuses.has("missing")) {

302+

if (hasExpiredOrMissing) {

285303

provider.status = "expired";

286-

} else if (statuses.has("expiring")) {

304+

} else if (hasExpiring) {

287305

provider.status = "expiring";

288306

} else {

289307

provider.status = "ok";