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

推荐订阅源

J
Java Code Geeks
量子位
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
A
About on SuperTechFans
腾讯CDC
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Last Week in AI
Last Week in AI
H
Help Net Security
WordPress大学
WordPress大学
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
博客园 - 【当耐特】
S
SegmentFault 最新的问题
美团技术团队
M
MIT News - Artificial intelligence
L
LangChain 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: avoid parent group allowlist false positive (#93434)...
kingrubic · 2026-06-16 · via Recent Commits to openclaw:main

@@ -9,6 +9,30 @@ vi.mock("../channel-capabilities.js", () => ({

99

groupAllowFromFallbackToAllowFrom: channelName !== "imessage",

1010

warnOnEmptyGroupSenderAllowlist: channelName !== "discord",

1111

}),

12+

resolveDoctorChannelAccountIds: (

13+

channelName: string,

14+

cfg: {

15+

channels?: Record<

16+

string,

17+

{ accounts?: Record<string, unknown>; appId?: string; baseUrl?: string }

18+

>;

19+

},

20+

configuredAccountIds: string[],

21+

) => {

22+

const channel = cfg.channels?.[channelName];

23+

const ids = Object.keys(channel?.accounts ?? {});

24+

const resolveAccountId = (accountId: string) =>

25+

channelName === "matrix" || channelName === "signal" ? accountId.toLowerCase() : accountId;

26+

const runtimeIds = [

27+

...(channelName === "qa-channel" && channel?.baseUrl ? ["default"] : []),

28+

...(channelName === "qqbot" && channel?.appId ? ["default"] : []),

29+

...ids,

30+

];

31+

return {

32+

configured: configuredAccountIds.map(resolveAccountId),

33+

runtime: runtimeIds.map(resolveAccountId),

34+

};

35+

},

1236

}));

13371438

vi.mock("./channel-doctor.js", () => ({

@@ -37,6 +61,130 @@ describe("doctor empty allowlist policy scan", () => {

3761

]);

3862

});

396364+

it("does not warn on empty parent groupAllowFrom when active accounts have effective group allowlists", () => {

65+

const warnings = scanEmptyAllowlistPolicyWarnings(

66+

{

67+

channels: {

68+

telegram: {

69+

groupPolicy: "allowlist",

70+

groupAllowFrom: [],

71+

accounts: {

72+

primary: { groupAllowFrom: ["telegram:group:primary"] },

73+

backup: { allowFrom: ["telegram:group:backup"] },

74+

},

75+

},

76+

},

77+

},

78+

{ doctorFixCommand: "openclaw doctor --fix" },

79+

);

80+81+

expect(warnings).toEqual([]);

82+

});

83+84+

it("keeps parent groupAllowFrom warning when any active account lacks an effective allowlist", () => {

85+

const warnings = scanEmptyAllowlistPolicyWarnings(

86+

{

87+

channels: {

88+

telegram: {

89+

groupPolicy: "allowlist",

90+

groupAllowFrom: [],

91+

accounts: {

92+

primary: { groupAllowFrom: ["telegram:group:primary"] },

93+

backup: {},

94+

},

95+

},

96+

},

97+

},

98+

{ doctorFixCommand: "openclaw doctor --fix" },

99+

);

100+101+

expect(warnings).toContain(

102+

'- channels.telegram.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.telegram.groupAllowFrom or channels.telegram.allowFrom, or set groupPolicy to "open".',

103+

);

104+

});

105+106+

it("keeps parent groupAllowFrom warning when an implicit default account is active", () => {

107+

const warnings = scanEmptyAllowlistPolicyWarnings(

108+

{

109+

channels: {

110+

"qa-channel": {

111+

baseUrl: "http://127.0.0.1:18789",

112+

groupPolicy: "allowlist",

113+

groupAllowFrom: [],

114+

accounts: {

115+

work: { groupAllowFrom: ["qa:group:work"] },

116+

},

117+

},

118+

},

119+

},

120+

{ doctorFixCommand: "openclaw doctor --fix" },

121+

);

122+123+

expect(warnings).toContain(

124+

'- channels.qa-channel.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.qa-channel.groupAllowFrom or channels.qa-channel.allowFrom, or set groupPolicy to "open".',

125+

);

126+

});

127+128+

it("matches canonical runtime account ids to mixed-case config keys", () => {

129+

const warnings = scanEmptyAllowlistPolicyWarnings(

130+

{

131+

channels: {

132+

matrix: {

133+

groupPolicy: "allowlist",

134+

groupAllowFrom: [],

135+

accounts: {

136+

Work: { groupAllowFrom: ["matrix:group:work"] },

137+

},

138+

},

139+

},

140+

},

141+

{ doctorFixCommand: "openclaw doctor --fix" },

142+

);

143+144+

expect(warnings).toEqual([]);

145+

});

146+147+

it("matches raw runtime account ids to canonical config keys", () => {

148+

const warnings = scanEmptyAllowlistPolicyWarnings(

149+

{

150+

channels: {

151+

signal: {

152+

groupPolicy: "allowlist",

153+

groupAllowFrom: [],

154+

accounts: {

155+

Work: { groupAllowFrom: ["signal:group:work"] },

156+

},

157+

},

158+

},

159+

},

160+

{ doctorFixCommand: "openclaw doctor --fix" },

161+

);

162+163+

expect(warnings).toEqual([]);

164+

});

165+166+

it("keeps parent warning for a distinct case-sensitive implicit default account", () => {

167+

const warnings = scanEmptyAllowlistPolicyWarnings(

168+

{

169+

channels: {

170+

qqbot: {

171+

appId: "top-level-app",

172+

groupPolicy: "allowlist",

173+

groupAllowFrom: [],

174+

accounts: {

175+

Default: { groupAllowFrom: ["qqbot:group:named"] },

176+

},

177+

},

178+

},

179+

},

180+

{ doctorFixCommand: "openclaw doctor --fix" },

181+

);

182+183+

expect(warnings).toContain(

184+

'- channels.qqbot.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.qqbot.groupAllowFrom or channels.qqbot.allowFrom, or set groupPolicy to "open".',

185+

);

186+

});

187+40188

it("allows provider-specific extra warnings without importing providers", () => {

41189

const warnings = scanEmptyAllowlistPolicyWarnings(

42190

{