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

推荐订阅源

V
V2EX
P
Proofpoint News Feed
D
DataBreaches.Net
C
Check Point Blog
L
LangChain Blog
量子位
美团技术团队
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
腾讯CDC
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale

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: route denied exec approval followups to sessions · o...
brokemac79 · 2026-05-31 · via Recent Commits to openclaw:main

@@ -113,17 +113,26 @@ describe("exec approval followup", () => {

113113

expect(sendMessage).not.toHaveBeenCalled();

114114

});

115115116-

it("suppresses denied followups for normal sessions", async () => {

117-

await expect(

118-

sendExecApprovalFollowup({

119-

approvalId: "req-denied-main",

120-

sessionKey: "agent:main:main",

121-

turnSourceChannel: "webchat",

122-

resultText: "Exec denied (gateway id=req-denied-main, user-denied): uname -a",

123-

}),

124-

).resolves.toBe(false);

116+

it("routes denied followups through the originating main session", async () => {

117+

await sendExecApprovalFollowup({

118+

approvalId: "req-denied-main",

119+

sessionKey: "agent:main:main",

120+

turnSourceChannel: "webchat",

121+

resultText: "Exec denied (gateway id=req-denied-main, user-denied): uname -a",

122+

});

125123126-

expect(callGatewayTool).not.toHaveBeenCalled();

124+

const agentArgs = expectGatewayAgentFollowup({

125+

sessionKey: "agent:main:main",

126+

deliver: false,

127+

channel: "webchat",

128+

idempotencyKey: "exec-approval-followup:req-denied-main",

129+

});

130+

expect(agentArgs.message).toContain("An async command did not run.");

131+

expect(agentArgs.message).toContain(

132+

"Exec denied (gateway id=req-denied-main, user-denied): uname -a",

133+

);

134+

expect(agentArgs.message).not.toContain("missing tool result");

135+

expect(agentArgs.message).not.toContain("transcript repair");

127136

expect(sendMessage).not.toHaveBeenCalled();

128137

});

129138

@@ -287,7 +296,9 @@ describe("exec approval followup", () => {

287296

});

288297

});

289298290-

it("uses safe direct denied copy without resuming the session", async () => {

299+

it("falls back to safe direct denied copy when session resume fails", async () => {

300+

vi.mocked(callGatewayTool).mockRejectedValueOnce(new Error("session missing"));

301+291302

await sendExecApprovalFollowup({

292303

approvalId: "req-denied-resume-failed",

293304

sessionKey: "agent:main:telegram:-100123",

@@ -302,10 +313,12 @@ describe("exec approval followup", () => {

302313

content: "Command did not run: approval timed out.",

303314

idempotencyKey: "exec-approval-followup:req-denied-resume-failed",

304315

});

305-

expect(callGatewayTool).not.toHaveBeenCalled();

316+

expect(callGatewayTool).toHaveBeenCalledTimes(1);

306317

});

307318308-

it("uses safe direct denied copy for nested-parentheses denial metadata without resuming the session", async () => {

319+

it("falls back to safe direct denied copy for nested-parentheses denial metadata", async () => {

320+

vi.mocked(callGatewayTool).mockRejectedValueOnce(new Error("session missing"));

321+309322

await sendExecApprovalFollowup({

310323

approvalId: "req-denied-resume-failed-nested",

311324

sessionKey: "agent:main:telegram:-100123",

@@ -321,7 +334,7 @@ describe("exec approval followup", () => {

321334

content: "Command did not run: approval timed out.",

322335

idempotencyKey: "exec-approval-followup:req-denied-resume-failed-nested",

323336

});

324-

expect(callGatewayTool).not.toHaveBeenCalled();

337+

expect(callGatewayTool).toHaveBeenCalledTimes(1);

325338

});

326339327340

it("suppresses denied followups for subagent sessions", async () => {