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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Jina AI
Jina AI
博客园 - 叶小钗
B
Blog RSS Feed
Recent Announcements
Recent Announcements
H
Help Net Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客

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: repair local approval resolution (#86771) · openclaw...
fuller-stack · 2026-05-27 · via Recent Commits to openclaw:main

File tree

  • extensions/discord/src/monitor

  • src/gateway

Original file line numberDiff line numberDiff line change

@@ -144,7 +144,7 @@ describe("discord exec approval monitor helpers", () => {

144144

});

145145

});

146146
147-

it("keeps already-resolved approval clicks quiet", async () => {

147+

it("shows a follow-up for already-resolved approval clicks", async () => {

148148

const interaction = createInteraction();

149149

const button = new ExecApprovalButton({

150150

getApprovers: () => ["123"],

@@ -154,7 +154,11 @@ describe("discord exec approval monitor helpers", () => {

154154

await button.run(interaction, { id: "abc", action: "allow-once" });

155155
156156

expect(interaction.acknowledge).toHaveBeenCalled();

157-

expect(interaction.followUp).not.toHaveBeenCalled();

157+

expect(interaction.followUp).toHaveBeenCalledWith({

158+

content:

159+

"That approval request is no longer pending. It may have expired or already been resolved.",

160+

ephemeral: true,

161+

});

158162

});

159163
160164

it("builds button context from config and routes resolution over gateway", async () => {

Original file line numberDiff line numberDiff line change

@@ -112,10 +112,13 @@ export class ExecApprovalButton extends Button {

112112

} catch {}

113113
114114

const result = await this.ctx.resolveApproval(parsed.approvalId, parsed.action);

115-

if (!result.ok && result.reason !== "not-found") {

115+

if (!result.ok) {

116116

try {

117117

await interaction.followUp({

118-

content: `Failed to submit approval decision for **${decisionLabel}**. The request may have expired or already been resolved.`,

118+

content:

119+

result.reason === "not-found"

120+

? `That approval request is no longer pending. It may have expired or already been resolved.`

121+

: `Failed to submit approval decision for **${decisionLabel}**. The request may have expired or already been resolved.`,

119122

ephemeral: true,

120123

});

121124

} catch {}

Original file line numberDiff line numberDiff line change

@@ -117,7 +117,7 @@ describe("withOperatorApprovalsGatewayClient", () => {

117117

expect(clientState.options?.deviceIdentity).toBeUndefined();

118118

});

119119
120-

it("omits approval runtime token for explicit gateway URL overrides", async () => {

120+

it("keeps approval runtime token for loopback explicit gateway URL overrides", async () => {

121121

await withOperatorApprovalsGatewayClient(

122122

{

123123

config: {} as never,

@@ -127,6 +127,21 @@ describe("withOperatorApprovalsGatewayClient", () => {

127127

async () => undefined,

128128

);

129129
130+

expect(typeof clientState.options?.approvalRuntimeToken).toBe("string");

131+

});

132+
133+

it("omits approval runtime token for remote explicit gateway URL overrides", async () => {

134+

bootstrapState.url = "wss://gateway.example/ws";

135+
136+

await withOperatorApprovalsGatewayClient(

137+

{

138+

config: {} as never,

139+

gatewayUrl: "wss://gateway.example/ws",

140+

clientDisplayName: "Matrix approval (@owner:example.org)",

141+

},

142+

async () => undefined,

143+

);

144+
130145

expect(clientState.options).not.toHaveProperty("approvalRuntimeToken");

131146

});

132147
Original file line numberDiff line numberDiff line change

@@ -44,12 +44,15 @@ export async function createOperatorApprovalsGatewayClient(

4444

gatewayUrl: params.gatewayUrl,

4545

env: process.env,

4646

});

47+

const shouldSendApprovalRuntimeToken = !params.gatewayUrl || isLoopbackGatewayUrl(bootstrap.url);

4748
4849

return new GatewayClient({

4950

url: bootstrap.url,

5051

token: bootstrap.auth.token,

5152

password: bootstrap.auth.password,

52-

...(params.gatewayUrl ? {} : { approvalRuntimeToken: getOperatorApprovalRuntimeToken() }),

53+

...(shouldSendApprovalRuntimeToken

54+

? { approvalRuntimeToken: getOperatorApprovalRuntimeToken() }

55+

: {}),

5356

preauthHandshakeTimeoutMs: bootstrap.preauthHandshakeTimeoutMs,

5457

clientName: GATEWAY_CLIENT_NAMES.GATEWAY_CLIENT,

5558

clientDisplayName: params.clientDisplayName,