From 9cb71f767242bd242deb6fb6fe7647126b630250 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Thu, 30 Apr 2026 02:55:45 -0700 Subject: [PATCH] chore(barnacle): add false positive close label (#75014) --- scripts/github/barnacle-auto-response.mjs | 10 +++++++++ test/scripts/barnacle-auto-response.test.ts | 24 +++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/scripts/github/barnacle-auto-response.mjs b/scripts/github/barnacle-auto-response.mjs index fea9d760873..710ab15f7a8 100644 --- a/scripts/github/barnacle-auto-response.mjs +++ b/scripts/github/barnacle-auto-response.mjs @@ -18,6 +18,12 @@ export const rules = [ message: "Please use [our support server](https://discord.gg/clawd) and ask in #help or #users-helping-users to resolve this, or follow the stuck FAQ at https://docs.openclaw.ai/help/faq#im-stuck-whats-the-fastest-way-to-get-unstuck.", }, + { + label: "r: false-positive", + close: true, + message: + "Closing this because it looks like a false positive or reclassification-only report rather than an actionable OpenClaw bug. If this is still a real issue, please open a fresh report with concrete reproduction steps and current-version details.", + }, { label: "r: no-ci-pr", close: true, @@ -64,6 +70,10 @@ export const managedLabelSpecs = { color: "0E8A16", description: "Auto-close: support requests belong in Discord or support docs.", }, + "r: false-positive": { + color: "D93F0B", + description: "Auto-close: false positive or reclassification-only report.", + }, "r: no-ci-pr": { color: "D93F0B", description: "Auto-close: PR only chasing known main CI/test failures.", diff --git a/test/scripts/barnacle-auto-response.test.ts b/test/scripts/barnacle-auto-response.test.ts index 286df6d3be0..b3e8ccf3288 100644 --- a/test/scripts/barnacle-auto-response.test.ts +++ b/test/scripts/barnacle-auto-response.test.ts @@ -192,6 +192,7 @@ describe("barnacle-auto-response", () => { expect(managedLabelSpecs["r: skill"].description).not.toContain("Clawdhub"); expect(managedLabelSpecs.dirty.description).toContain("dirty/unrelated"); expect(managedLabelSpecs["r: support"].description).toContain("support requests"); + expect(managedLabelSpecs["r: false-positive"].description).toContain("false positive"); expect(managedLabelSpecs["r: third-party-extension"].description).toContain("ClawHub"); expect(managedLabelSpecs["r: too-many-prs"].description).toContain("ten active PRs"); @@ -394,6 +395,29 @@ describe("barnacle-auto-response", () => { expect(calls.update).toEqual([]); }); + it("closes issues tagged as false positives", async () => { + const { calls, github } = barnacleGithub([]); + + await runBarnacleAutoResponse({ + github, + context: barnacleIssueContext({}, ["r: false-positive"], { + action: "labeled", + label: { name: "r: false-positive" }, + sender: { login: "maintainer", type: "User" }, + }), + core: { + info: () => undefined, + }, + }); + + expect(calls.createComment).toContainEqual( + expect.objectContaining({ + body: expect.stringContaining("false positive"), + }), + ); + expect(calls.update).toContainEqual(expect.objectContaining({ state: "closed" })); + }); + it("does not respond to maintainer comments on contributor items", async () => { const { calls, github } = barnacleGithub([], { maintainerLogins: ["maintainer"] });