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

推荐订阅源

博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
罗磊的独立博客
C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
I
InfoQ
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
B
Blog RSS 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
test: tighten qa matrix media assertions · openclaw/openc...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -3174,47 +3174,46 @@ describe("matrix live qa scenarios", () => {

3174317431753175

const scenario = requireMatrixQaScenario("matrix-room-block-streaming");

317631763177-

await expect(

3178-

runMatrixQaScenario(scenario, {

3179-

baseUrl: "http://127.0.0.1:28008/",

3180-

canary: undefined,

3181-

driverAccessToken: "driver-token",

3182-

driverUserId: "@driver:matrix-qa.test",

3183-

observedEvents: [],

3184-

observerAccessToken: "observer-token",

3185-

observerUserId: "@observer:matrix-qa.test",

3186-

roomId: "!main:matrix-qa.test",

3187-

restartGateway: undefined,

3188-

syncState: {},

3189-

sutAccessToken: "sut-token",

3190-

sutUserId: "@sut:matrix-qa.test",

3191-

timeoutMs: 8_000,

3192-

topology: {

3193-

defaultRoomId: "!main:matrix-qa.test",

3194-

defaultRoomKey: "main",

3195-

rooms: [

3196-

{

3197-

key: "block",

3198-

kind: "group",

3199-

memberRoles: ["driver", "observer", "sut"],

3200-

memberUserIds: [

3201-

"@driver:matrix-qa.test",

3202-

"@observer:matrix-qa.test",

3203-

"@sut:matrix-qa.test",

3204-

],

3205-

name: "Block",

3206-

requireMention: true,

3207-

roomId: "!block:matrix-qa.test",

3208-

},

3209-

],

3210-

},

3211-

}),

3212-

).resolves.toMatchObject({

3213-

artifacts: {

3214-

blockEventIds: ["$block-one", "$block-two"],

3215-

driverEventId: "$block-stream-trigger",

3177+

const result = await runMatrixQaScenario(scenario, {

3178+

baseUrl: "http://127.0.0.1:28008/",

3179+

canary: undefined,

3180+

driverAccessToken: "driver-token",

3181+

driverUserId: "@driver:matrix-qa.test",

3182+

observedEvents: [],

3183+

observerAccessToken: "observer-token",

3184+

observerUserId: "@observer:matrix-qa.test",

3185+

roomId: "!main:matrix-qa.test",

3186+

restartGateway: undefined,

3187+

syncState: {},

3188+

sutAccessToken: "sut-token",

3189+

sutUserId: "@sut:matrix-qa.test",

3190+

timeoutMs: 8_000,

3191+

topology: {

3192+

defaultRoomId: "!main:matrix-qa.test",

3193+

defaultRoomKey: "main",

3194+

rooms: [

3195+

{

3196+

key: "block",

3197+

kind: "group",

3198+

memberRoles: ["driver", "observer", "sut"],

3199+

memberUserIds: [

3200+

"@driver:matrix-qa.test",

3201+

"@observer:matrix-qa.test",

3202+

"@sut:matrix-qa.test",

3203+

],

3204+

name: "Block",

3205+

requireMention: true,

3206+

roomId: "!block:matrix-qa.test",

3207+

},

3208+

],

32163209

},

32173210

});

3211+

const artifacts = result.artifacts as {

3212+

blockEventIds?: unknown;

3213+

driverEventId?: unknown;

3214+

};

3215+

expect(artifacts.blockEventIds).toEqual(["$block-one", "$block-two"]);

3216+

expect(artifacts.driverEventId).toBe("$block-stream-trigger");

3218321732193218

expect(sendTextMessage).toHaveBeenCalledWith({

32203219

body: expect.stringContaining("Block streaming QA check"),

@@ -3225,12 +3224,7 @@ describe("matrix live qa scenarios", () => {

32253224

expect(body).toMatch(

32263225

/reply with exactly this two-line body and no extra text:\nMATRIX_QA_BLOCK_ONE_[A-F0-9]{8}\nMATRIX_QA_BLOCK_TWO_[A-F0-9]{8}$/,

32273226

);

3228-

expect(waitForRoomEvent).toHaveBeenNthCalledWith(

3229-

2,

3230-

expect.objectContaining({

3231-

since: "driver-sync-block-one",

3232-

}),

3233-

);

3227+

expect(waitForRoomEvent.mock.calls[1]?.[0]?.since).toBe("driver-sync-block-one");

32343228

});

3235322932363230

it("sends a real Matrix image attachment for image-understanding prompts", async () => {

@@ -3274,67 +3268,57 @@ describe("matrix live qa scenarios", () => {

3274326832753269

const scenario = requireMatrixQaScenario("matrix-room-image-understanding-attachment");

327632703277-

await expect(

3278-

runMatrixQaScenario(scenario, {

3279-

baseUrl: "http://127.0.0.1:28008/",

3280-

canary: undefined,

3281-

driverAccessToken: "driver-token",

3282-

driverUserId: "@driver:matrix-qa.test",

3283-

observedEvents: [],

3284-

observerAccessToken: "observer-token",

3285-

observerUserId: "@observer:matrix-qa.test",

3286-

roomId: "!main:matrix-qa.test",

3287-

restartGateway: undefined,

3288-

syncState: {},

3289-

sutAccessToken: "sut-token",

3290-

sutUserId: "@sut:matrix-qa.test",

3291-

timeoutMs: 8_000,

3292-

topology: {

3293-

defaultRoomId: "!main:matrix-qa.test",

3294-

defaultRoomKey: "main",

3295-

rooms: [

3296-

{

3297-

key: scenarioTesting.MATRIX_QA_MEDIA_ROOM_KEY,

3298-

kind: "group",

3299-

memberRoles: ["driver", "observer", "sut"],

3300-

memberUserIds: [

3301-

"@driver:matrix-qa.test",

3302-

"@observer:matrix-qa.test",

3303-

"@sut:matrix-qa.test",

3304-

],

3305-

name: "Media",

3306-

requireMention: true,

3307-

roomId: "!media:matrix-qa.test",

3308-

},

3309-

],

3310-

},

3311-

}),

3312-

).resolves.toMatchObject({

3313-

artifacts: {

3314-

attachmentFilename: "red-top-blue-bottom.png",

3315-

driverEventId: "$image-understanding-trigger",

3316-

reply: {

3317-

eventId: "$sut-image-reply",

3318-

},

3271+

const result = await runMatrixQaScenario(scenario, {

3272+

baseUrl: "http://127.0.0.1:28008/",

3273+

canary: undefined,

3274+

driverAccessToken: "driver-token",

3275+

driverUserId: "@driver:matrix-qa.test",

3276+

observedEvents: [],

3277+

observerAccessToken: "observer-token",

3278+

observerUserId: "@observer:matrix-qa.test",

3279+

roomId: "!main:matrix-qa.test",

3280+

restartGateway: undefined,

3281+

syncState: {},

3282+

sutAccessToken: "sut-token",

3283+

sutUserId: "@sut:matrix-qa.test",

3284+

timeoutMs: 8_000,

3285+

topology: {

3286+

defaultRoomId: "!main:matrix-qa.test",

3287+

defaultRoomKey: "main",

3288+

rooms: [

3289+

{

3290+

key: scenarioTesting.MATRIX_QA_MEDIA_ROOM_KEY,

3291+

kind: "group",

3292+

memberRoles: ["driver", "observer", "sut"],

3293+

memberUserIds: [

3294+

"@driver:matrix-qa.test",

3295+

"@observer:matrix-qa.test",

3296+

"@sut:matrix-qa.test",

3297+

],

3298+

name: "Media",

3299+

requireMention: true,

3300+

roomId: "!media:matrix-qa.test",

3301+

},

3302+

],

33193303

},

33203304

});

3321-3322-

expect(sendMediaMessage).toHaveBeenCalledWith(

3323-

expect.objectContaining({

3324-

body: expect.stringContaining("Image understanding check"),

3325-

contentType: "image/png",

3326-

fileName: "red-top-blue-bottom.png",

3327-

kind: "image",

3328-

mentionUserIds: ["@sut:matrix-qa.test"],

3329-

roomId: "!media:matrix-qa.test",

3330-

}),

3331-

);

3332-

expect(waitForRoomEvent).toHaveBeenNthCalledWith(

3333-

2,

3334-

expect.objectContaining({

3335-

since: "driver-sync-attachment",

3336-

}),

3337-

);

3305+

const artifacts = result.artifacts as {

3306+

attachmentFilename?: unknown;

3307+

driverEventId?: unknown;

3308+

reply?: { eventId?: unknown };

3309+

};

3310+

expect(artifacts.attachmentFilename).toBe("red-top-blue-bottom.png");

3311+

expect(artifacts.driverEventId).toBe("$image-understanding-trigger");

3312+

expect(artifacts.reply?.eventId).toBe("$sut-image-reply");

3313+3314+

const mediaMessage = sendMediaMessage.mock.calls[0]?.[0];

3315+

expect(String(mediaMessage?.body)).toContain("Image understanding check");

3316+

expect(mediaMessage?.contentType).toBe("image/png");

3317+

expect(mediaMessage?.fileName).toBe("red-top-blue-bottom.png");

3318+

expect(mediaMessage?.kind).toBe("image");

3319+

expect(mediaMessage?.mentionUserIds).toEqual(["@sut:matrix-qa.test"]);

3320+

expect(mediaMessage?.roomId).toBe("!media:matrix-qa.test");

3321+

expect(waitForRoomEvent.mock.calls[1]?.[0]?.since).toBe("driver-sync-attachment");

33383322

});

3339332333403324

it("waits for a real Matrix image attachment after image generation", async () => {

@@ -3372,50 +3356,52 @@ describe("matrix live qa scenarios", () => {

3372335633733357

const scenario = requireMatrixQaScenario("matrix-room-generated-image-delivery");

337433583375-

await expect(

3376-

runMatrixQaScenario(scenario, {

3377-

baseUrl: "http://127.0.0.1:28008/",

3378-

canary: undefined,

3379-

driverAccessToken: "driver-token",

3380-

driverUserId: "@driver:matrix-qa.test",

3381-

observedEvents: [],

3382-

observerAccessToken: "observer-token",

3383-

observerUserId: "@observer:matrix-qa.test",

3384-

roomId: "!main:matrix-qa.test",

3385-

restartGateway: undefined,

3386-

syncState: {},

3387-

sutAccessToken: "sut-token",

3388-

sutUserId: "@sut:matrix-qa.test",

3389-

timeoutMs: 8_000,

3390-

topology: {

3391-

defaultRoomId: "!main:matrix-qa.test",

3392-

defaultRoomKey: "main",

3393-

rooms: [

3394-

{

3395-

key: scenarioTesting.MATRIX_QA_MEDIA_ROOM_KEY,

3396-

kind: "group",

3397-

memberRoles: ["driver", "observer", "sut"],

3398-

memberUserIds: [

3399-

"@driver:matrix-qa.test",

3400-

"@observer:matrix-qa.test",

3401-

"@sut:matrix-qa.test",

3402-

],

3403-

name: "Media",

3404-

requireMention: true,

3405-

roomId: "!media:matrix-qa.test",

3406-

},

3407-

],

3408-

},

3409-

}),

3410-

).resolves.toMatchObject({

3411-

artifacts: {

3412-

attachmentEventId: "$sut-image",

3413-

attachmentFilename: "qa-lighthouse.png",

3414-

attachmentKind: "image",

3415-

attachmentMsgtype: "m.image",

3416-

driverEventId: "$image-generate-trigger",

3359+

const result = await runMatrixQaScenario(scenario, {

3360+

baseUrl: "http://127.0.0.1:28008/",

3361+

canary: undefined,

3362+

driverAccessToken: "driver-token",

3363+

driverUserId: "@driver:matrix-qa.test",

3364+

observedEvents: [],

3365+

observerAccessToken: "observer-token",

3366+

observerUserId: "@observer:matrix-qa.test",

3367+

roomId: "!main:matrix-qa.test",

3368+

restartGateway: undefined,

3369+

syncState: {},

3370+

sutAccessToken: "sut-token",

3371+

sutUserId: "@sut:matrix-qa.test",

3372+

timeoutMs: 8_000,

3373+

topology: {

3374+

defaultRoomId: "!main:matrix-qa.test",

3375+

defaultRoomKey: "main",

3376+

rooms: [

3377+

{

3378+

key: scenarioTesting.MATRIX_QA_MEDIA_ROOM_KEY,

3379+

kind: "group",

3380+

memberRoles: ["driver", "observer", "sut"],

3381+

memberUserIds: [

3382+

"@driver:matrix-qa.test",

3383+

"@observer:matrix-qa.test",

3384+

"@sut:matrix-qa.test",

3385+

],

3386+

name: "Media",

3387+

requireMention: true,

3388+

roomId: "!media:matrix-qa.test",

3389+

},

3390+

],

34173391

},

34183392

});

3393+

const artifacts = result.artifacts as {

3394+

attachmentEventId?: unknown;

3395+

attachmentFilename?: unknown;

3396+

attachmentKind?: unknown;

3397+

attachmentMsgtype?: unknown;

3398+

driverEventId?: unknown;

3399+

};

3400+

expect(artifacts.attachmentEventId).toBe("$sut-image");

3401+

expect(artifacts.attachmentFilename).toBe("qa-lighthouse.png");

3402+

expect(artifacts.attachmentKind).toBe("image");

3403+

expect(artifacts.attachmentMsgtype).toBe("m.image");

3404+

expect(artifacts.driverEventId).toBe("$image-generate-trigger");

3419340534203406

expect(sendTextMessage).toHaveBeenCalledWith({

34213407

body: expect.stringContaining("/tool image_generate action=generate"),