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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
月光博客
月光博客
腾讯CDC
Engineering at Meta
Engineering at Meta
博客园 - Franky
Vercel News
Vercel News
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
GbyAI
GbyAI
B
Blog
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS 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
test: tighten synology chat auth assertions · openclaw/op...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -52,6 +52,26 @@ function createSynologySetupPrompter(params: { allowedUserIds?: string } = {}) {

5252

});

5353

}

545455+

async function expectDmAuthorization(params: {

56+

userId: string;

57+

dmPolicy: "open" | "allowlist" | "disabled";

58+

allowedUserIds: string[];

59+

allowed: boolean;

60+

reasonCode?: string;

61+

}): Promise<void> {

62+

const auth = await authorizeUserForDmWithIngress({

63+

accountId: "default",

64+

userId: params.userId,

65+

dmPolicy: params.dmPolicy,

66+

allowedUserIds: params.allowedUserIds,

67+

});

68+69+

expect(auth.senderAccess.allowed).toBe(params.allowed);

70+

if (params.reasonCode !== undefined) {

71+

expect(auth.senderAccess.reasonCode).toBe(params.reasonCode);

72+

}

73+

}

74+5575

describe("synology-chat core", () => {

5676

afterAll(() => {

5777

vi.unstubAllEnvs();

@@ -317,74 +337,46 @@ describe("synology-chat security helpers", () => {

317337

});

318338319339

it("matches DM policy decisions through channel ingress", async () => {

320-

await expect(

321-

authorizeUserForDmWithIngress({

322-

accountId: "default",

323-

userId: "user1",

324-

dmPolicy: "open",

325-

allowedUserIds: [],

326-

}),

327-

).resolves.toMatchObject({

328-

senderAccess: {

329-

allowed: false,

330-

reasonCode: "dm_policy_not_allowlisted",

331-

},

340+

await expectDmAuthorization({

341+

userId: "user1",

342+

dmPolicy: "open",

343+

allowedUserIds: [],

344+

allowed: false,

345+

reasonCode: "dm_policy_not_allowlisted",

332346

});

333-

await expect(

334-

authorizeUserForDmWithIngress({

335-

accountId: "default",

336-

userId: "user1",

337-

dmPolicy: "open",

338-

allowedUserIds: ["*"],

339-

}),

340-

).resolves.toMatchObject({ senderAccess: { allowed: true } });

341-

await expect(

342-

authorizeUserForDmWithIngress({

343-

accountId: "default",

344-

userId: "user1",

345-

dmPolicy: "disabled",

346-

allowedUserIds: ["user1"],

347-

}),

348-

).resolves.toMatchObject({

349-

senderAccess: {

350-

allowed: false,

351-

reasonCode: "dm_policy_disabled",

352-

},

347+

await expectDmAuthorization({

348+

userId: "user1",

349+

dmPolicy: "open",

350+

allowedUserIds: ["*"],

351+

allowed: true,

353352

});

354-

await expect(

355-

authorizeUserForDmWithIngress({

356-

accountId: "default",

357-

userId: "user1",

358-

dmPolicy: "allowlist",

359-

allowedUserIds: [],

360-

}),

361-

).resolves.toMatchObject({

362-

senderAccess: {

363-

allowed: false,

364-

reasonCode: "dm_policy_not_allowlisted",

365-

},

353+

await expectDmAuthorization({

354+

userId: "user1",

355+

dmPolicy: "disabled",

356+

allowedUserIds: ["user1"],

357+

allowed: false,

358+

reasonCode: "dm_policy_disabled",

366359

});

367-

await expect(

368-

authorizeUserForDmWithIngress({

369-

accountId: "default",

370-

userId: "user9",

371-

dmPolicy: "allowlist",

372-

allowedUserIds: ["user1"],

373-

}),

374-

).resolves.toMatchObject({

375-

senderAccess: {

376-

allowed: false,

377-

reasonCode: "dm_policy_not_allowlisted",

378-

},

360+

await expectDmAuthorization({

361+

userId: "user1",

362+

dmPolicy: "allowlist",

363+

allowedUserIds: [],

364+

allowed: false,

365+

reasonCode: "dm_policy_not_allowlisted",

366+

});

367+

await expectDmAuthorization({

368+

userId: "user9",

369+

dmPolicy: "allowlist",

370+

allowedUserIds: ["user1"],

371+

allowed: false,

372+

reasonCode: "dm_policy_not_allowlisted",

373+

});

374+

await expectDmAuthorization({

375+

userId: "user1",

376+

dmPolicy: "allowlist",

377+

allowedUserIds: ["user1", "user2"],

378+

allowed: true,

379379

});

380-

await expect(

381-

authorizeUserForDmWithIngress({

382-

accountId: "default",

383-

userId: "user1",

384-

dmPolicy: "allowlist",

385-

allowedUserIds: ["user1", "user2"],

386-

}),

387-

).resolves.toMatchObject({ senderAccess: { allowed: true } });

388380

});

389381390382

it("redacts Synology user IDs and allowlist entries from ingress state/decision", async () => {