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

推荐订阅源

D
DataBreaches.Net
J
Java Code Geeks
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
量子位
D
Docker
V
Visual Studio Blog
博客园 - 司徒正美
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
U
Unit 42
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
V
V2EX
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
Vercel News
Vercel News
C
Check Point 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
perf(doctor): skip plugin scans for unrelated session sta...
steipete · 2026-05-07 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -3,6 +3,7 @@ import {

33

applySessionRouteStateRepair,

44

resolveConfiguredDoctorSessionStateRoute,

55

scanSessionRouteStateOwners,

6+

storeMayContainPluginSessionRouteState,

67

} from "./doctor-session-state-providers.js";

78
89

const codexOwner = {

@@ -15,6 +16,35 @@ const codexOwner = {

1516

};

1617
1718

describe("doctor session state provider routes", () => {

19+

it("skips plugin route-state scans for unrelated recovery metadata", () => {

20+

expect(

21+

storeMayContainPluginSessionRouteState({

22+

"agent:main:subagent:wedged-child": {

23+

sessionId: "session-wedged-child",

24+

updatedAt: 1,

25+

abortedLastRun: true,

26+

subagentRecovery: {

27+

automaticAttempts: 2,

28+

lastAttemptAt: 1,

29+

wedgedAt: 2,

30+

wedgedReason: "blocked",

31+

},

32+

},

33+

}),

34+

).toBe(false);

35+
36+

expect(

37+

storeMayContainPluginSessionRouteState({

38+

"agent:main:telegram:direct:1": {

39+

sessionId: "session-codex",

40+

updatedAt: 1,

41+

modelProvider: "openai-codex",

42+

model: "gpt-5.4",

43+

},

44+

}),

45+

).toBe(true);

46+

});

47+
1848

it("preserves raw configured CLI runtimes before harness policy normalization", () => {

1949

expect(

2050

resolveConfiguredDoctorSessionStateRoute({

Original file line numberDiff line numberDiff line change

@@ -126,6 +126,29 @@ function resolvePluginDoctorSessionRouteStateOwners(params: {

126126

return listPluginDoctorSessionRouteStateOwners({ env: params.env });

127127

}

128128
129+

function entryMayContainPluginSessionRouteState(entry: SessionEntry): boolean {

130+

const record = entry as unknown as Record<string, unknown>;

131+

return (

132+

normalizeString(record.providerOverride) !== undefined ||

133+

normalizeString(record.modelOverride) !== undefined ||

134+

normalizeString(record.modelOverrideSource) !== undefined ||

135+

record.liveModelSwitchPending !== undefined ||

136+

normalizeString(record.modelProvider) !== undefined ||

137+

normalizeString(record.model) !== undefined ||

138+

normalizeString(record.agentHarnessId) !== undefined ||

139+

record.cliSessionBindings !== undefined ||

140+

record.cliSessionIds !== undefined ||

141+

normalizeString(record.authProfileOverride) !== undefined ||

142+

normalizeString(record.authProfileOverrideSource) !== undefined

143+

);

144+

}

145+
146+

export function storeMayContainPluginSessionRouteState(

147+

store: Record<string, SessionEntry>,

148+

): boolean {

149+

return Object.values(store).some((entry) => entryMayContainPluginSessionRouteState(entry));

150+

}

151+
129152

export type DoctorSessionRouteState = {

130153

defaultProvider: string;

131154

configuredModelRefs: string[];

@@ -434,6 +457,9 @@ export async function runPluginSessionStateDoctorRepairs(params: {

434457

warnings: string[];

435458

changes: string[];

436459

}): Promise<void> {

460+

if (!storeMayContainPluginSessionRouteState(params.store)) {

461+

return;

462+

}

437463

const owners = resolvePluginDoctorSessionRouteStateOwners({ env: params.env });

438464

if (owners.length === 0) {

439465

return;