From e1d6f2e36cd70998f7452e7c17f181307220bea0 Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Thu, 2 Jul 2026 04:25:35 +0800 Subject: [PATCH] fix(signals): match hyphenated refactor-only no-issue rationale Co-authored-by: Cursor --- src/signals/engine.ts | 3 ++- test/unit/signals-v2.test.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/signals/engine.ts b/src/signals/engine.ts index ff4d12627a..235cbee3f9 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -4980,7 +4980,8 @@ export function hasClearNoIssueRationale(pr: Pick { }); }); +describe("hasClearNoIssueRationale refactor-only spelling", () => { + it("recognizes hyphenated and spaced refactor-only rationales", () => { + expect(hasClearNoIssueRationale({ title: "refactor only: split helper", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "refactor-only: split helper", body: "" })).toBe(true); + expect(hasClearNoIssueRationale({ title: "Rename queue module", body: "This is a refactor only rename." })).toBe(true); + }); + + it("still rejects unrelated PR text that mentions refactors without a rationale", () => { + expect(hasClearNoIssueRationale({ title: "Refactor queue processor", body: "Extracts shared helper." })).toBe(false); + expect(hasClearNoIssueRationale({ title: "Improve signal engine structure", body: "" })).toBe(false); + }); +}); + function snapshot( id: string, repositories: Array<{