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

推荐订阅源

云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
月光博客
月光博客
Last Week in AI
Last Week in AI
博客园_首页
I
InfoQ
T
Tailwind CSS Blog
爱范儿
爱范儿
雷峰网
雷峰网
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
B
Blog
WordPress大学
WordPress大学
A
About on SuperTechFans
V
Visual Studio Blog
有赞技术团队
有赞技术团队
P
Proofpoint News Feed

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(sessions): tighten gateway model-run key predicate · ...
2026-06-25 · via Recent Commits to openclaw:main

@@ -278,6 +278,58 @@ describe("pruneStaleModelRunEntries", () => {

278278

),

279279

).toBe(false);

280280

});

281+282+

it("rejects non-canonical session keys that do not parse as agent-scoped", () => {

283+

// Unscoped: missing `agent:<id>:` prefix — parseAgentSessionKey returns null.

284+

expect(

285+

isGatewayModelRunSessionKey("explicit:model-run-123e4567-e89b-12d3-a456-426614174000"),

286+

).toBe(false);

287+

// Empty agent id segment: not a canonical `agent:<id>:` scoped key.

288+

expect(

289+

isGatewayModelRunSessionKey("agent::explicit:model-run-123e4567-e89b-12d3-a456-426614174000"),

290+

).toBe(false);

291+

// Extra colon segment between agent id and `explicit:` — rest starts

292+

// with `extra:` and fails the predicate's regex.

293+

expect(

294+

isGatewayModelRunSessionKey(

295+

"agent:main:extra:explicit:model-run-123e4567-e89b-12d3-a456-426614174000",

296+

),

297+

).toBe(false);

298+

// Whitespace-padded keys are non-canonical even though parseAgentSessionKey

299+

// trims before normalizing; the predicate intentionally checks the original

300+

// key shape before accepting a model-run key.

301+

expect(

302+

isGatewayModelRunSessionKey(

303+

" agent:main:explicit:model-run-123e4567-e89b-12d3-a456-426614174000",

304+

),

305+

).toBe(false);

306+

expect(

307+

isGatewayModelRunSessionKey(

308+

"agent:main:explicit:model-run-123e4567-e89b-12d3-a456-426614174000 ",

309+

),

310+

).toBe(false);

311+

});

312+313+

it("matches canonical keys whose agent id begins with model-run-", () => {

314+

// Guards against an over-tight fix that confuses the agent id segment

315+

// with the `explicit:model-run-<uuid>` rest segment.

316+

expect(

317+

isGatewayModelRunSessionKey(

318+

"agent:model-run-foo:explicit:model-run-123e4567-e89b-12d3-a456-426614174000",

319+

),

320+

).toBe(true);

321+

});

322+323+

it("preserves case-insensitive matching for canonical keys", () => {

324+

// normalizeLowercaseStringOrEmpty + parseAgentSessionKey's normalization

325+

// lower-case everything outside opaque peer IDs, so a mixed-case

326+

// canonical key still matches.

327+

expect(

328+

isGatewayModelRunSessionKey(

329+

"agent:Main:Explicit:Model-Run-123E4567-E89B-12D3-A456-426614174000",

330+

),

331+

).toBe(true);

332+

});

281333

});

282334283335

describe("capEntryCount", () => {