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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog
S
SegmentFault 最新的问题
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
J
Java Code Geeks
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI

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(slack): wake on user-group mentions · openclaw/opencl...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -27,6 +27,7 @@ import {

2727

createSlackSessionStoreFixture,

2828

createSlackTestAccount,

2929

} from "./prepare.test-helpers.js";

30+

import { clearSlackSubteamMentionCacheForTest } from "./subteam-mentions.js";

30313132

const enqueueSystemEventMock = vi.hoisted(() => vi.fn());

3233

@@ -49,6 +50,7 @@ describe("slack prepareSlackMessage inbound contract", () => {

4950

resetSlackThreadStarterCacheForTest();

5051

clearSlackThreadParticipationCache();

5152

clearSlackAllowFromCacheForTest();

53+

clearSlackSubteamMentionCacheForTest();

5254

enqueueSystemEventMock.mockClear();

5355

});

5456

@@ -1183,6 +1185,95 @@ describe("slack prepareSlackMessage inbound contract", () => {

11831185

expect(new Set([root!.ctxPayload.SessionKey, followUp!.ctxPayload.SessionKey]).size).toBe(1);

11841186

});

118511871188+

it("treats Slack user-group mentions as explicit mentions when the bot is a member", async () => {

1189+

const usergroupsUsersList = vi.fn().mockResolvedValue({

1190+

ok: true,

1191+

users: ["U_OTHER", "B1"],

1192+

});

1193+

const slackCtx = createInboundSlackCtx({

1194+

cfg: {

1195+

channels: {

1196+

slack: {

1197+

enabled: true,

1198+

groupPolicy: "open",

1199+

channels: { C0AGENTS: { requireMention: true } },

1200+

},

1201+

},

1202+

} as OpenClawConfig,

1203+

appClient: {

1204+

usergroups: { users: { list: usergroupsUsersList } },

1205+

} as unknown as App["client"],

1206+

defaultRequireMention: true,

1207+

});

1208+

slackCtx.resolveChannelName = async () => ({ name: "agents", type: "channel" });

1209+

slackCtx.resolveUserName = async () => ({ name: "Bek" });

1210+1211+

const prepared = await prepareSlackMessage({

1212+

ctx: slackCtx,

1213+

account: createSlackAccount(),

1214+

message: {

1215+

type: "message",

1216+

channel: "C0AGENTS",

1217+

channel_type: "channel",

1218+

user: "U_BEK",

1219+

text: "<!subteam^S0AGENTS|agents> triage this",

1220+

ts: "1777244692.409919",

1221+

} as SlackMessageEvent,

1222+

opts: { source: "message" },

1223+

});

1224+1225+

expect(usergroupsUsersList).toHaveBeenCalledWith({

1226+

usergroup: "S0AGENTS",

1227+

team_id: "T1",

1228+

});

1229+

expect(prepared).toBeTruthy();

1230+

expect(prepared!.ctxPayload.WasMentioned).toBe(true);

1231+

});

1232+1233+

it("drops Slack user-group mentions when the bot is not a member", async () => {

1234+

const usergroupsUsersList = vi.fn().mockResolvedValue({

1235+

ok: true,

1236+

users: ["U_OTHER"],

1237+

});

1238+

const slackCtx = createInboundSlackCtx({

1239+

cfg: {

1240+

channels: {

1241+

slack: {

1242+

enabled: true,

1243+

groupPolicy: "open",

1244+

channels: { C0AGENTS: { requireMention: true } },

1245+

},

1246+

},

1247+

} as OpenClawConfig,

1248+

appClient: {

1249+

usergroups: { users: { list: usergroupsUsersList } },

1250+

} as unknown as App["client"],

1251+

defaultRequireMention: true,

1252+

});

1253+

slackCtx.resolveChannelName = async () => ({ name: "agents", type: "channel" });

1254+

slackCtx.resolveUserName = async () => ({ name: "Bek" });

1255+1256+

const prepared = await prepareSlackMessage({

1257+

ctx: slackCtx,

1258+

account: createSlackAccount(),

1259+

message: {

1260+

type: "message",

1261+

channel: "C0AGENTS",

1262+

channel_type: "channel",

1263+

user: "U_BEK",

1264+

text: "<!subteam^S0AGENTS|agents> triage this",

1265+

ts: "1777244692.409920",

1266+

} as SlackMessageEvent,

1267+

opts: { source: "message" },

1268+

});

1269+1270+

expect(usergroupsUsersList).toHaveBeenCalledWith({

1271+

usergroup: "S0AGENTS",

1272+

team_id: "T1",

1273+

});

1274+

expect(prepared).toBeNull();

1275+

});

1276+11861277

it("keeps a regex-mentioned Slack thread root and URL-only follow-up on one parent session", async () => {

11871278

const { storePath } = storeFixture.makeTmpStorePath();

11881279

const rootTs = "1777244692.409919";