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

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

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(agents): narrow session lock scope · openclaw/opencla...
steipete · 2026-04-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai

1313
1414

### Fixes

1515
16+

- Agents/sessions: acquire the session write lock only after cold bootstrap, plugin, and tool setup so fallback runs are not blocked by stalled pre-model startup work. Thanks @codex.

1617

- Gateway/models: skip external OpenRouter and LiteLLM pricing refreshes for local/self-hosted model endpoints so startup does not wait on remote pricing catalogs for local-only Ollama, vLLM, and compatible providers. Thanks @codex.

1718

- CLI/plugins: stop security-blocked plugin installs from retrying as hook packs, so normal plugin packages report the scanner failure without a misleading "not a valid hook pack" follow-up. Fixes #61175; supersedes #64102. Thanks @KonsultDigital and @ziyincody.

1819

- Control UI/Dreaming: require explicit confirmation before applying restart-impacting Dreaming mode changes, with restart warning copy and loading feedback. Fixes #63804. (#63807) Thanks @bbddbb1.

Original file line numberDiff line numberDiff line change

@@ -253,6 +253,27 @@ describe("runEmbeddedAttempt context engine sessionKey forwarding", () => {

253253

expectCalledWithSessionKey(afterTurn, sessionKey);

254254

});

255255
256+

it("resolves bootstrap context before acquiring the session write lock", async () => {

257+

const events: string[] = [];

258+

hoisted.resolveBootstrapContextForRunMock.mockImplementation(async () => {

259+

events.push("bootstrap");

260+

return { bootstrapFiles: [], contextFiles: [] };

261+

});

262+

hoisted.acquireSessionWriteLockMock.mockImplementation(async () => {

263+

events.push("lock");

264+

return { release: async () => {} };

265+

});

266+
267+

await createContextEngineAttemptRunner({

268+

contextEngine: createContextEngineBootstrapAndAssemble(),

269+

sessionKey,

270+

tempPaths,

271+

});

272+
273+

expect(events).toEqual(expect.arrayContaining(["bootstrap", "lock"]));

274+

expect(events.indexOf("bootstrap")).toBeLessThan(events.indexOf("lock"));

275+

});

276+
256277

it("forwards modelId to assemble", async () => {

257278

const { bootstrap, assemble } = createContextEngineBootstrapAndAssemble();

258279

const contextEngine = createTestContextEngine({ bootstrap, assemble });

Original file line numberDiff line numberDiff line change

@@ -639,16 +639,6 @@ export async function runEmbeddedAttempt(

639639

agentId: sessionAgentId,

640640

});

641641
642-

const sessionLock = await acquireSessionWriteLock({

643-

sessionFile: params.sessionFile,

644-

maxHoldMs: resolveSessionLockMaxHoldFromTimeout({

645-

timeoutMs: resolveRunTimeoutWithCompactionGraceMs({

646-

runTimeoutMs: params.timeoutMs,

647-

compactionTimeoutMs: resolveCompactionTimeoutMs(params.config),

648-

}),

649-

}),

650-

});

651-
652642

const sessionLabel = params.sessionKey ?? params.sessionId;

653643

const contextInjectionMode = resolveContextInjectionMode(params.config);

654644

const agentDir = params.agentDir ?? resolveOpenClawAgentDir();

@@ -1205,6 +1195,19 @@ export async function runEmbeddedAttempt(

12051195

let systemPromptText = systemPromptOverride();

12061196

const userPromptPrefixText = bootstrapRouting.userPromptPrefixText;

12071197
1198+

// Keep the session lock scoped to transcript/session mutations. Cold plugin

1199+

// and tool setup can be slow, and holding the lock there blocks CLI fallback

1200+

// from taking over the same session when a gateway run stalls before model I/O.

1201+

const sessionLock = await acquireSessionWriteLock({

1202+

sessionFile: params.sessionFile,

1203+

maxHoldMs: resolveSessionLockMaxHoldFromTimeout({

1204+

timeoutMs: resolveRunTimeoutWithCompactionGraceMs({

1205+

runTimeoutMs: params.timeoutMs,

1206+

compactionTimeoutMs: resolveCompactionTimeoutMs(params.config),

1207+

}),

1208+

}),

1209+

});

1210+
12081211

let sessionManager: ReturnType<typeof guardSessionManager> | undefined;

12091212

let session: Awaited<ReturnType<typeof createAgentSession>>["session"] | undefined;

12101213

let removeToolResultContextGuard: (() => void) | undefined;