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

推荐订阅源

D
Docker
I
InfoQ
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
博客园_首页
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
B
Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
F
Fortinet All Blogs
月光博客
月光博客
GbyAI
GbyAI

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(exec): cover control ui approval turn-source resolut...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1491,6 +1491,74 @@ describe("exec approval handlers", () => {

14911491

}

14921492

});

149314931494+

it("resolves Control UI-style approvals by id while preserving stored turn-source metadata", async () => {

1495+

const { handlers, forwarder, respond, context } = createForwardingExecApprovalFixture();

1496+

const broadcasts: Array<{ event: string; payload: unknown }> = [];

1497+

const requestContext = {

1498+

...context,

1499+

hasExecApprovalClients: () => true,

1500+

broadcast: (event: string, payload: unknown) => {

1501+

broadcasts.push({ event, payload });

1502+

},

1503+

};

1504+1505+

const requestPromise = requestExecApproval({

1506+

handlers,

1507+

respond,

1508+

context: requestContext,

1509+

params: {

1510+

id: "approval-control-ui-multichannel",

1511+

twoPhase: true,

1512+

timeoutMs: 60_000,

1513+

host: "gateway",

1514+

nodeId: undefined,

1515+

systemRunPlan: undefined,

1516+

sessionKey: "agent:main:feishu:chat-123",

1517+

turnSourceChannel: "feishu",

1518+

turnSourceTo: "chat-123",

1519+

turnSourceAccountId: "work",

1520+

turnSourceThreadId: "thread-456",

1521+

},

1522+

});

1523+

await drainApprovalRequestTicks();

1524+1525+

const resolveRespond = vi.fn();

1526+

await resolveExecApproval({

1527+

handlers,

1528+

id: "approval-control-ui-multichannel",

1529+

respond: resolveRespond,

1530+

context: requestContext,

1531+

});

1532+

await requestPromise;

1533+1534+

expect(resolveRespond).toHaveBeenCalledWith(true, { ok: true }, undefined);

1535+

expect(forwarder.handleResolved).toHaveBeenCalledWith(

1536+

expect.objectContaining({

1537+

id: "approval-control-ui-multichannel",

1538+

decision: "allow-once",

1539+

request: expect.objectContaining({

1540+

sessionKey: "agent:main:feishu:chat-123",

1541+

turnSourceChannel: "feishu",

1542+

turnSourceTo: "chat-123",

1543+

turnSourceAccountId: "work",

1544+

turnSourceThreadId: "thread-456",

1545+

}),

1546+

}),

1547+

);

1548+

expect(broadcasts).toContainEqual(

1549+

expect.objectContaining({

1550+

event: "exec.approval.resolved",

1551+

payload: expect.objectContaining({

1552+

id: "approval-control-ui-multichannel",

1553+

request: expect.objectContaining({

1554+

turnSourceChannel: "feishu",

1555+

turnSourceTo: "chat-123",

1556+

}),

1557+

}),

1558+

}),

1559+

);

1560+

});

1561+14941562

it("fast-fails approvals when no approver clients and no forwarding targets", async () => {

14951563

const { manager, handlers, forwarder, respond, context } =

14961564

createForwardingExecApprovalFixture();