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

推荐订阅源

The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 司徒正美
Last Week in AI
Last Week in AI
爱范儿
爱范儿
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
量子位
V
V2EX
博客园 - 叶小钗
宝玉的分享
宝玉的分享
T
Tailwind CSS 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(qa): tolerate fast Matrix tool replies · openclaw/ope...
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main

@@ -867,6 +867,7 @@ async function runMatrixToolProgressScenario(

867867

params: {

868868

expectedPreviewKind: MatrixQaObservedEvent["kind"];

869869

finalText: string;

870+

allowFinalOnly?: boolean;

870871

label: string;

871872

allowGenericProgressLine?: boolean;

872873

mentionSafety?: boolean;

@@ -896,9 +897,13 @@ async function runMatrixToolProgressScenario(

896897

predicate: (event) =>

897898

event.roomId === context.roomId &&

898899

event.sender === context.sutUserId &&

899-

event.kind === params.expectedPreviewKind &&

900-

(event.relatesTo === undefined ||

901-

(event.relatesTo.relType === "m.replace" && matchesExpectedProgress(event.body))),

900+

((event.kind === params.expectedPreviewKind &&

901+

(event.relatesTo === undefined ||

902+

(event.relatesTo.relType === "m.replace" && matchesExpectedProgress(event.body)))) ||

903+

(params.allowFinalOnly === true &&

904+

event.relatesTo === undefined &&

905+

isMatrixQaMessageLikeKind(event.kind) &&

906+

doesMatrixQaReplyBodyMatchToken(event, params.finalText))),

902907

roomId: context.roomId,

903908

since: startSince,

904909

timeoutMs: context.timeoutMs,

@@ -916,6 +921,44 @@ async function runMatrixToolProgressScenario(

916921

}),

917922

);

918923

});

924+

if (

925+

params.allowFinalOnly === true &&

926+

doesMatrixQaReplyBodyMatchToken(preview.event, params.finalText)

927+

) {

928+

const unexpectedWorkingEvents = findMatrixQaUnexpectedWorkingEvents({

929+

events: context.observedEvents,

930+

finalEventId: preview.event.eventId,

931+

startIndex: startObservedIndex,

932+

sutUserId: context.sutUserId,

933+

});

934+

if (unexpectedWorkingEvents.length > 0) {

935+

throw new Error(

936+

`Matrix tool progress leaked outside preview event: ${unexpectedWorkingEvents.map((event) => `${event.eventId}:${event.body ?? ""}`).join("; ")}`,

937+

);

938+

}

939+

advanceMatrixQaActorCursor({

940+

actorId: "driver",

941+

syncState: context.syncState,

942+

nextSince: preview.since,

943+

startSince,

944+

});

945+

const finalReply = buildMatrixReplyArtifact(preview.event, params.finalText);

946+

return {

947+

artifacts: {

948+

driverEventId,

949+

previewEventId: undefined,

950+

reply: finalReply,

951+

token: params.finalText,

952+

triggerBody,

953+

},

954+

details: [

955+

`driver event: ${driverEventId}`,

956+

`scenario: ${params.label}`,

957+

"preview event: <none>; final delivered before observable tool-progress preview",

958+

...buildMatrixReplyDetails("final reply", finalReply),

959+

].join("\n"),

960+

} satisfies MatrixQaScenarioExecution;

961+

}

919962

const previewRootEventId = getPreviewRootEventId(preview.event);

920963

const progress = matchesExpectedProgress(preview.event.body)

921964

? preview

@@ -1041,6 +1084,7 @@ export async function runToolProgressPreviewScenario(context: MatrixQaScenarioCo

10411084

expectedPreviewKind: "notice",

10421085

finalText: buildMatrixQaToken("MATRIX_QA_TOOL_PROGRESS"),

10431086

label: "tool progress preview",

1087+

allowFinalOnly: true,

10441088

allowGenericProgressLine: true,

10451089

progressPattern: /\b(?:tool:\s*)?read\s*:\s*from\b|\btool:\s*read\b/i,

10461090

triggerBodyBuilder: buildMatrixToolProgressPrompt,