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

推荐订阅源

量子位
Recent Announcements
Recent Announcements
D
Docker
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
B
Blog
博客园_首页
罗磊的独立博客
D
DataBreaches.Net
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

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(github): action manual Barnacle triage labels · openc...
vincentkoc · 2026-04-28 · via Recent Commits to openclaw:main

@@ -44,14 +44,20 @@ function file(filename: string, status = "modified") {

4444

};

4545

}

464647-

function barnacleContext(pullRequest: Record<string, unknown>, labels: string[] = []) {

47+

function barnacleContext(

48+

pullRequest: Record<string, unknown>,

49+

labels: string[] = [],

50+

options: Record<string, unknown> = {},

51+

) {

4852

return {

4953

repo: {

5054

owner: "openclaw",

5155

repo: "openclaw",

5256

},

5357

payload: {

54-

action: "opened",

58+

action: options.action ?? "opened",

59+

label: options.label,

60+

sender: options.sender,

5561

pull_request: {

5662

number: 123,

5763

title: "Cleanup plugin docs",

@@ -70,7 +76,10 @@ function barnacleContext(pullRequest: Record<string, unknown>, labels: string[]

7076

function barnacleGithub(files: ReturnType<typeof file>[]) {

7177

const calls = {

7278

addLabels: [] as Array<{ issue_number: number; labels: string[] }>,

79+

createComment: [] as Array<{ issue_number: number; body: string }>,

80+

lock: [] as Array<{ issue_number: number; lock_reason?: string }>,

7381

removeLabel: [] as Array<{ issue_number: number; name: string }>,

82+

update: [] as Array<{ issue_number: number; state?: string }>,

7483

};

7584

const github = {

7685

paginate: async () => files,

@@ -79,7 +88,9 @@ function barnacleGithub(files: ReturnType<typeof file>[]) {

7988

addLabels: async (params: { issue_number: number; labels: string[] }) => {

8089

calls.addLabels.push(params);

8190

},

82-

createComment: async () => undefined,

91+

createComment: async (params: { issue_number: number; body: string }) => {

92+

calls.createComment.push(params);

93+

},

8394

createLabel: async () => undefined,

8495

getLabel: async (params: { name: string }) => ({

8596

data: {

@@ -89,11 +100,15 @@ function barnacleGithub(files: ReturnType<typeof file>[]) {

89100

managedLabelSpecs[params.name as keyof typeof managedLabelSpecs]?.description ?? "",

90101

},

91102

}),

92-

lock: async () => undefined,

103+

lock: async (params: { issue_number: number; lock_reason?: string }) => {

104+

calls.lock.push(params);

105+

},

93106

removeLabel: async (params: { issue_number: number; name: string }) => {

94107

calls.removeLabel.push(params);

95108

},

96-

update: async () => undefined,

109+

update: async (params: { issue_number: number; state?: string }) => {

110+

calls.update.push(params);

111+

},

97112

updateLabel: async () => undefined,

98113

},

99114

pulls: {

@@ -195,6 +210,30 @@ describe("barnacle-auto-response", () => {

195210

expect(labels).not.toContain(candidateLabels.dirtyCandidate);

196211

});

197212213+

it("does not classify a linked core plugin auto-enable fix as an external plugin candidate", () => {

214+

const labels = classifyPullRequestCandidateLabels(

215+

pr(

216+

"Fix duplicate plugin auto-enable entries",

217+

[

218+

"- Problem: openclaw doctor --fix adds duplicate installed plugin entries",

219+

"- Why it matters: users get noisy config churn",

220+

"- What changed: respect manifest-provided channel auto-loads",

221+

"",

222+

"Fixes #37548",

223+

"",

224+

"This touches external plugin install state but fixes core config repair behavior.",

225+

].join("\n"),

226+

),

227+

[

228+

file("src/config/plugin-auto-enable.shared.ts"),

229+

file("src/config/plugin-auto-enable.channels.test.ts"),

230+

file("src/config/plugin-auto-enable.test-helpers.ts"),

231+

],

232+

);

233+234+

expect(labels).not.toContain(candidateLabels.externalPluginCandidate);

235+

});

236+198237

it("does not add candidate labels to maintainer-authored PRs", async () => {

199238

const { calls, github } = barnacleGithub([

200239

file("ui/src/app.ts"),

@@ -272,5 +311,73 @@ describe("barnacle-auto-response", () => {

272311

labels: expect.arrayContaining([candidateLabels.dirtyCandidate]),

273312

}),

274313

);

314+

expect(calls.createComment).toEqual([]);

315+

expect(calls.update).toEqual([]);

316+

});

317+318+

it("actions manually applied candidate labels", async () => {

319+

const { calls, github } = barnacleGithub([file("extensions/example/openclaw.plugin.json")]);

320+321+

await runBarnacleAutoResponse({

322+

github,

323+

context: barnacleContext({}, [candidateLabels.externalPluginCandidate], {

324+

action: "labeled",

325+

label: { name: candidateLabels.externalPluginCandidate },

326+

sender: { login: "maintainer", type: "User" },

327+

}),

328+

core: {

329+

info: () => undefined,

330+

},

331+

});

332+333+

expect(calls.createComment).toContainEqual(

334+

expect.objectContaining({

335+

body: expect.stringContaining("ClawHub"),

336+

}),

337+

);

338+

expect(calls.update).toContainEqual(expect.objectContaining({ state: "closed" }));

339+

});

340+341+

it("keeps bot-applied candidate labels passive", async () => {

342+

const { calls, github } = barnacleGithub([file("extensions/example/openclaw.plugin.json")]);

343+344+

await runBarnacleAutoResponse({

345+

github,

346+

context: barnacleContext({}, [candidateLabels.externalPluginCandidate], {

347+

action: "labeled",

348+

label: { name: candidateLabels.externalPluginCandidate },

349+

sender: { login: "openclaw-bot[bot]", type: "Bot" },

350+

}),

351+

core: {

352+

info: () => undefined,

353+

},

354+

});

355+356+

expect(calls.createComment).toEqual([]);

357+

expect(calls.update).toEqual([]);

358+

});

359+360+

it("actions existing candidate labels when a maintainer adds trigger-response", async () => {

361+

const { calls, github } = barnacleGithub([file("src/gateway/foo.test.ts")]);

362+363+

await runBarnacleAutoResponse({

364+

github,

365+

context: barnacleContext({}, [candidateLabels.testOnlyNoBug, "trigger-response"], {

366+

action: "labeled",

367+

label: { name: "trigger-response" },

368+

sender: { login: "maintainer", type: "User" },

369+

}),

370+

core: {

371+

info: () => undefined,

372+

},

373+

});

374+375+

expect(calls.removeLabel).toContainEqual(expect.objectContaining({ name: "trigger-response" }));

376+

expect(calls.createComment).toContainEqual(

377+

expect.objectContaining({

378+

body: expect.stringContaining("only changes tests"),

379+

}),

380+

);

381+

expect(calls.update).toContainEqual(expect.objectContaining({ state: "closed" }));

275382

});

276383

});