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

推荐订阅源

T
Tailwind CSS Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
L
LangChain Blog
博客园_首页
Recent Announcements
Recent Announcements
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
博客园 - 叶小钗
博客园 - 【当耐特】
The Cloudflare Blog
J
Java Code Geeks
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans

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 sync loss assertions · openclaw/o...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -1907,98 +1907,80 @@ describe("matrix live qa scenarios", () => {

1907190719081908

const scenario = requireMatrixQaScenario("matrix-e2ee-sync-state-loss-crypto-intact");

190919091910-

await expect(

1911-

runMatrixQaScenario(scenario, {

1912-

...matrixQaScenarioContext(),

1913-

driverDeviceId: "DRIVER",

1914-

gatewayRuntimeEnv: {

1915-

OPENCLAW_CONFIG_PATH: gatewayConfigPath,

1916-

PATH: process.env.PATH,

1917-

},

1918-

gatewayStateDir: stateRoot,

1919-

observerDeviceId: "OBSERVER",

1920-

outputDir: stateRoot,

1921-

restartGatewayAfterStateMutation: async (mutateState) => {

1922-

callOrder.push("hard-restart");

1923-

await mutateState({ stateDir: stateRoot });

1924-

const config = JSON.parse(await readFile(gatewayConfigPath, "utf8")) as {

1925-

channels: {

1926-

matrix: {

1927-

accounts: Record<string, { groups?: Record<string, unknown>; userId?: string }>;

1928-

defaultAccount?: string;

1929-

};

1910+

const result = await runMatrixQaScenario(scenario, {

1911+

...matrixQaScenarioContext(),

1912+

driverDeviceId: "DRIVER",

1913+

gatewayRuntimeEnv: {

1914+

OPENCLAW_CONFIG_PATH: gatewayConfigPath,

1915+

PATH: process.env.PATH,

1916+

},

1917+

gatewayStateDir: stateRoot,

1918+

observerDeviceId: "OBSERVER",

1919+

outputDir: stateRoot,

1920+

restartGatewayAfterStateMutation: async (mutateState) => {

1921+

callOrder.push("hard-restart");

1922+

await mutateState({ stateDir: stateRoot });

1923+

const config = JSON.parse(await readFile(gatewayConfigPath, "utf8")) as {

1924+

channels: {

1925+

matrix: {

1926+

accounts: Record<string, { groups?: Record<string, unknown>; userId?: string }>;

1927+

defaultAccount?: string;

19301928

};

19311929

};

1932-

hardRestartAccounts.push({

1933-

accounts: config.channels.matrix.accounts,

1934-

defaultAccount: config.channels.matrix.defaultAccount,

1935-

});

1936-

},

1937-

sutAccountId: "sut",

1938-

sutDeviceId: "SUT",

1939-

waitGatewayAccountReady,

1940-

}),

1941-

).resolves.toMatchObject({

1942-

artifacts: {

1943-

deletedSyncStorePath: syncStorePath,

1944-

driverEventId: "$driver-trigger",

1945-

replyEventId: "$sut-decrypted-reply",

1946-

roomKey: "e2ee-sync-state-loss-crypto-intact-recovery",

1930+

};

1931+

hardRestartAccounts.push({

1932+

accounts: config.channels.matrix.accounts,

1933+

defaultAccount: config.channels.matrix.defaultAccount,

1934+

});

19471935

},

1936+

sutAccountId: "sut",

1937+

sutDeviceId: "SUT",

1938+

waitGatewayAccountReady,

19481939

});

1940+

const artifacts = result.artifacts as {

1941+

deletedSyncStorePath?: unknown;

1942+

driverEventId?: unknown;

1943+

replyEventId?: unknown;

1944+

roomKey?: unknown;

1945+

};

1946+

expect(artifacts.deletedSyncStorePath).toBe(syncStorePath);

1947+

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

1948+

expect(artifacts.replyEventId).toBe("$sut-decrypted-reply");

1949+

expect(artifacts.roomKey).toBe("e2ee-sync-state-loss-crypto-intact-recovery");

1949195019501951

await expectPathMissing(syncStorePath);

1951-

expect(registerWithToken).toHaveBeenCalledWith(

1952-

expect.objectContaining({

1953-

registrationToken: "registration-token",

1954-

}),

1955-

);

1952+

expect(registerWithToken.mock.calls[0]?.[0]?.registrationToken).toBe("registration-token");

19561953

expect(createPrivateRoom).toHaveBeenCalledWith({

19571954

encrypted: true,

19581955

inviteUserIds: ["@observer:matrix-qa.test", "@sync-gateway:matrix-qa.test"],

19591956

name: "Matrix QA E2EE Sync State Loss Recovery Room",

19601957

});

19611958

expect(observerJoinRoom).toHaveBeenCalledWith("!recovery:matrix-qa.test");

19621959

expect(sutJoinRoom).toHaveBeenCalledWith("!recovery:matrix-qa.test");

1963-

expect(hardRestartAccounts).toEqual([

1964-

{

1965-

accounts: {

1966-

"sync-state-loss-gateway": expect.objectContaining({

1967-

groups: {

1968-

"!recovery:matrix-qa.test": {

1969-

enabled: true,

1970-

requireMention: true,

1971-

},

1972-

},

1973-

userId: "@sync-gateway:matrix-qa.test",

1974-

}),

1975-

},

1976-

defaultAccount: "sync-state-loss-gateway",

1977-

},

1978-

{

1979-

accounts: {

1980-

"sync-state-loss-gateway": expect.objectContaining({

1981-

groups: {

1982-

"!recovery:matrix-qa.test": {

1983-

enabled: true,

1984-

requireMention: true,

1985-

},

1986-

},

1987-

userId: "@sync-gateway:matrix-qa.test",

1988-

}),

1989-

},

1990-

defaultAccount: "sync-state-loss-gateway",

1991-

},

1992-

{

1993-

accounts: {

1994-

sut: expect.objectContaining({

1995-

groups: originalGroups,

1996-

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

1997-

}),

1998-

},

1999-

defaultAccount: "sut",

1960+

expect(hardRestartAccounts).toHaveLength(3);

1961+

const recoveryGroup = {

1962+

"!recovery:matrix-qa.test": {

1963+

enabled: true,

1964+

requireMention: true,

20001965

},

2001-

]);

1966+

};

1967+

expect(hardRestartAccounts[0]?.defaultAccount).toBe("sync-state-loss-gateway");

1968+

expect(hardRestartAccounts[0]?.accounts["sync-state-loss-gateway"]?.groups).toEqual(

1969+

recoveryGroup,

1970+

);

1971+

expect(hardRestartAccounts[0]?.accounts["sync-state-loss-gateway"]?.userId).toBe(

1972+

"@sync-gateway:matrix-qa.test",

1973+

);

1974+

expect(hardRestartAccounts[1]?.defaultAccount).toBe("sync-state-loss-gateway");

1975+

expect(hardRestartAccounts[1]?.accounts["sync-state-loss-gateway"]?.groups).toEqual(

1976+

recoveryGroup,

1977+

);

1978+

expect(hardRestartAccounts[1]?.accounts["sync-state-loss-gateway"]?.userId).toBe(

1979+

"@sync-gateway:matrix-qa.test",

1980+

);

1981+

expect(hardRestartAccounts[2]?.defaultAccount).toBe("sut");

1982+

expect(hardRestartAccounts[2]?.accounts.sut?.groups).toEqual(originalGroups);

1983+

expect(hardRestartAccounts[2]?.accounts.sut?.userId).toBe("@sut:matrix-qa.test");

20021984

expect(callOrder).toEqual([

20031985

"create-room",

20041986

"observer-join",

@@ -2017,12 +1999,9 @@ describe("matrix live qa scenarios", () => {

20171999

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

20182000

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

20192001

});

2020-

expect(rawWaitForRoomEvent).toHaveBeenCalledWith(

2021-

expect.objectContaining({

2022-

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

2023-

since: "raw-driver-sync-start",

2024-

}),

2025-

);

2002+

const waitParams = rawWaitForRoomEvent.mock.calls[0]?.[0];

2003+

expect(waitParams?.roomId).toBe("!recovery:matrix-qa.test");

2004+

expect(waitParams?.since).toBe("raw-driver-sync-start");

20262005

const finalConfig = JSON.parse(await readFile(gatewayConfigPath, "utf8")) as {

20272006

channels: {

20282007

matrix: {