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

推荐订阅源

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: avoid early Slack credential leases in Mantis · open...
steipete · 2026-05-05 · via Recent Commits to openclaw:main

@@ -157,9 +157,11 @@ describe("mantis Slack desktop smoke runtime", () => {

157157158158

it("leases Convex Slack credentials for gateway setup and maps them into the VM env", async () => {

159159

const commands: { args: readonly string[]; command: string; env?: NodeJS.ProcessEnv }[] = [];

160+

const events: string[] = [];

160161

const fetchMock = vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {

161162

const url = describeFetchInput(input);

162163

if (url.endsWith("/acquire")) {

164+

events.push("acquire");

163165

return new Response(

164166

JSON.stringify({

165167

credentialId: "cred-slack",

@@ -177,6 +179,7 @@ describe("mantis Slack desktop smoke runtime", () => {

177179

);

178180

}

179181

if (url.endsWith("/release") || url.endsWith("/heartbeat")) {

182+

events.push(url.endsWith("/release") ? "release" : "heartbeat");

180183

return new Response(JSON.stringify({ status: "ok" }), { status: 200 });

181184

}

182185

throw new Error(`unexpected fetch: ${url} ${describeFetchBody(init?.body)}`);

@@ -186,6 +189,7 @@ describe("mantis Slack desktop smoke runtime", () => {

186189

const runner = vi.fn(

187190

async (command: string, args: readonly string[], options: { env?: NodeJS.ProcessEnv }) => {

188191

commands.push({ command, args, env: options.env });

192+

events.push(`${command}:${args[0]}`);

189193

if (command === "/tmp/crabbox" && args[0] === "warmup") {

190194

return { stdout: "ready lease cbx_c0ffee\n", stderr: "" };

191195

}

@@ -244,6 +248,17 @@ describe("mantis Slack desktop smoke runtime", () => {

244248

});

245249246250

expect(result.status).toBe("pass");

251+

expect(events).toEqual(

252+

expect.arrayContaining([

253+

"/tmp/crabbox:warmup",

254+

"/tmp/crabbox:inspect",

255+

"acquire",

256+

"/tmp/crabbox:run",

257+

"release",

258+

]),

259+

);

260+

expect(events.indexOf("acquire")).toBeGreaterThan(events.indexOf("/tmp/crabbox:inspect"));

261+

expect(events.indexOf("acquire")).toBeLessThan(events.indexOf("/tmp/crabbox:run"));

247262

const runCommand = commands.find(

248263

(entry) => entry.command === "/tmp/crabbox" && entry.args[0] === "run",

249264

);

@@ -274,6 +289,59 @@ describe("mantis Slack desktop smoke runtime", () => {

274289

expect(summary.slackUrl).toBe("https://app.slack.com/client/TLEASED/CLEASED");

275290

});

276291292+

it("stops a created no-keep lease when the remote Slack QA run fails", async () => {

293+

const commands: { args: readonly string[]; command: string }[] = [];

294+

const runner = vi.fn(async (command: string, args: readonly string[]) => {

295+

commands.push({ command, args });

296+

if (command === "/tmp/crabbox" && args[0] === "warmup") {

297+

return { stdout: "ready lease cbx_fade123\n", stderr: "" };

298+

}

299+

if (command === "/tmp/crabbox" && args[0] === "inspect") {

300+

return {

301+

stdout: `${JSON.stringify({

302+

host: "203.0.113.10",

303+

id: "cbx_fade123",

304+

provider: "hetzner",

305+

sshKey: "/tmp/key",

306+

sshPort: "2222",

307+

sshUser: "crabbox",

308+

})}\n`,

309+

stderr: "",

310+

};

311+

}

312+

if (command === "/tmp/crabbox" && args[0] === "run") {

313+

throw new Error("remote Slack QA failed");

314+

}

315+

if (command === "rsync") {

316+

const outputDir = args.at(-1);

317+

await fs.mkdir(outputDir as string, { recursive: true });

318+

if (!String(outputDir).endsWith("slack-qa/")) {

319+

await fs.writeFile(path.join(outputDir as string, "slack-desktop-smoke.png"), "png");

320+

await fs.writeFile(path.join(outputDir as string, "remote-metadata.json"), "{}\n");

321+

}

322+

}

323+

return { stdout: "", stderr: "" };

324+

});

325+326+

const result = await runMantisSlackDesktopSmoke({

327+

commandRunner: runner,

328+

crabboxBin: "/tmp/crabbox",

329+

keepLease: false,

330+

outputDir: ".artifacts/qa-e2e/mantis/slack-desktop-created-fail",

331+

repoRoot,

332+

});

333+334+

expect(result.status).toBe("fail");

335+

expect(commands).toEqual(

336+

expect.arrayContaining([

337+

expect.objectContaining({

338+

args: ["stop", "--provider", "hetzner", "cbx_fade123"],

339+

command: "/tmp/crabbox",

340+

}),

341+

]),

342+

);

343+

});

344+277345

it("passes gateway setup when Crabbox returns non-zero after remote metadata proves success", async () => {

278346

const runner = vi.fn(async (command: string, args: readonly string[]) => {

279347

if (command === "/tmp/crabbox" && args[0] === "warmup") {