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

推荐订阅源

B
Blog RSS Feed
Martin Fowler
Martin Fowler
爱范儿
爱范儿
IT之家
IT之家
Last Week in AI
Last Week in AI
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
The Cloudflare Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
腾讯CDC
Microsoft Security Blog
Microsoft Security 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 Matrix configured two-person room routing (#85137) · ...
joshavant · 2026-05-22 · via Recent Commits to openclaw:main

@@ -4,6 +4,7 @@ import type { MatrixConfig, MatrixStreamingMode } from "../../types.js";

44

import type { MatrixRoomInfo } from "./room-info.js";

5566

type DirectRoomTrackerOptions = {

7+

isExplicitlyConfiguredRoom?: (roomId: string) => boolean | Promise<boolean>;

78

canPromoteRecentInvite?: (roomId: string) => boolean | Promise<boolean>;

89

canPromoteUnmappedStrictRoom?: (roomId: string) => boolean | Promise<boolean>;

910

shouldKeepLocallyPromotedDirectRoom?:

@@ -145,7 +146,18 @@ vi.mock("../../runtime-api.js", () => {

145146

ToolPolicySchema: z.any().optional(),

146147

addAllowlistUserEntriesFromConfigEntry: vi.fn(),

147148

buildChannelConfigSchema: (schema: unknown) => schema,

148-

buildChannelKeyCandidates: () => [],

149+

buildChannelKeyCandidates: (...keys: Array<string | undefined | null>) => {

150+

const seen = new Set<string>();

151+

return keys

152+

.map((key) => (typeof key === "string" ? key.trim() : ""))

153+

.filter((key) => {

154+

if (!key || seen.has(key)) {

155+

return false;

156+

}

157+

seen.add(key);

158+

return true;

159+

});

160+

},

149161

buildProbeChannelStatusSummary: (

150162

snapshot: Record<string, unknown>,

151163

extra?: Record<string, unknown>,

@@ -961,6 +973,55 @@ describe("monitorMatrixProvider", () => {

961973

await expect(trackerOpts.canPromoteRecentInvite("!room:example.org")).resolves.toBe(false);

962974

});

963975976+

it("wires exact room config as a direct-room classifier veto", async () => {

977+

(hoisted.accountConfig as { rooms?: Record<string, unknown> }).rooms = {

978+

"!room:example.org": { requireMention: true },

979+

"*": { requireMention: false },

980+

};

981+982+

await startMonitorAndAbortAfterStartup();

983+984+

const trackerOpts = directRoomTrackerOptions();

985+

if (!trackerOpts?.isExplicitlyConfiguredRoom) {

986+

throw new Error("explicit room config callback was not wired");

987+

}

988+989+

expect(await trackerOpts.isExplicitlyConfiguredRoom("!room:example.org")).toBe(true);

990+

expect(await trackerOpts.isExplicitlyConfiguredRoom("!other:example.org")).toBe(false);

991+

expect(hoisted.getRoomInfo).not.toHaveBeenCalled();

992+

});

993+994+

it("wires alias room config as a direct-room classifier veto", async () => {

995+

(hoisted.accountConfig as { rooms?: Record<string, unknown> }).rooms = {

996+

"#ops:example.org": { requireMention: true },

997+

"*": { requireMention: false },

998+

};

999+

const { resolveMatrixTargets } = await import("../../resolve-targets.js");

1000+

vi.mocked(resolveMatrixTargets).mockResolvedValueOnce([

1001+

{

1002+

input: "#ops:example.org",

1003+

resolved: true,

1004+

id: "!room:example.org",

1005+

},

1006+

]);

1007+1008+

await startMonitorAndAbortAfterStartup();

1009+1010+

const trackerOpts = directRoomTrackerOptions();

1011+

if (!trackerOpts?.isExplicitlyConfiguredRoom) {

1012+

throw new Error("explicit room config callback was not wired");

1013+

}

1014+1015+

hoisted.getRoomInfo.mockResolvedValueOnce({

1016+

canonicalAlias: "#ops:example.org",

1017+

altAliases: [],

1018+

nameResolved: true,

1019+

aliasesResolved: true,

1020+

});

1021+1022+

expect(await trackerOpts.isExplicitlyConfiguredRoom("!room:example.org")).toBe(true);

1023+

});

1024+9641025

it("wires recent-invite promotion to reject named rooms", async () => {

9651026

await startMonitorAndAbortAfterStartup();

9661027