Skip to content

fix(signals): match hyphenated refactor-only no-issue rationale - #2271

Closed
luciferlive112116 wants to merge 3 commits into
JSONbored:mainfrom
luciferlive112116:fix/signals-refactor-only-no-issue-rationale
Closed

fix(signals): match hyphenated refactor-only no-issue rationale#2271
luciferlive112116 wants to merge 3 commits into
JSONbored:mainfrom
luciferlive112116:fix/signals-refactor-only-no-issue-rationale

Conversation

@luciferlive112116

@luciferlive112116 luciferlive112116 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

hasClearNoIssueRationale in src/signals/engine.ts is the shared definition of a clear no-issue rationale for the slop signal (#562), the public PR-panel traceability check, and the hard linked-issue gate. After #1905 (docs-only) and #1993 (test-only), refactor-only PRs using the same Conventional Commits spelling were still missed.

Consequence: a refactor-only PR with no linked issue — e.g. refactor-only: split helper — on a repo with linkedIssueGateMode === "block" can hit hardLinkedIssueBlock, fail the gate, and be auto-closed despite a valid rationale.

Fix: widen the alternative to refactor[\s-]+only, matching refactor only, refactor-only, and embedded body forms while leaving unrelated refactor mentions unchanged.

No linked issue: this repo's linkedIssuePolicy is preferred, and this is a small, self-evident one-token regex correctness fix parallel to the merged docs-only (#1905) and test-only (#1993) fixes.

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npm run test:coverage — new hasClearNoIssueRationale refactor-only spelling tests cover space, hyphenated, embedded body, and negative cases.
  • npm run test:ci

If any required check was skipped, explain why:

  • Node/npm is unavailable in this environment; CI will run the full gate on the PR.

Safety

  • No secrets/wallets/hotkeys; public GitHub output unchanged except correctly recognizing valid rationales.
  • No auth/API/UI change.

Notes

  • Reproduction: hasClearNoIssueRationale({ title: "refactor-only: split helper", body: "" }) returned false (should be true); "Refactor queue processor" still returns false.

@dosubot dosubot Bot added the size:XS label Jul 1, 2026
@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-01 17:19:19 UTC

2 files · 1 AI reviewer · no blockers · readiness 55/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
The diff correctly broadens the shared rationale matcher in `src/signals/engine.ts` from test/docs-only spellings to also accept `refactor only` and `refactor-only`, while preserving the existing negative behavior for ordinary refactor descriptions. The added unit coverage exercises title and body placement plus the important unrelated-refactor negative case, so the visible change is scoped and coherent with the PR description. I do not see a reachable correctness defect in the changed code.

Nits — 4 non-blocking
  • nit: `test/unit/signals-v2.test.ts:1777` bundles the spaced, hyphenated, and body-placement positives into one test body; an `it.each` table would make future failures identify the exact spelling that regressed.
  • Consider converting the new positive cases in `test/unit/signals-v2.test.ts:1777` to a small table so this stays parallel with future docs/test/refactor spelling coverage.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 24 registered-repo PR(s), 6 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 24 PR(s), 7 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: luciferlive112116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 24 PR(s), 7 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (PR #2117)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (17d70b2) to head (bdfadfc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2271   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files         222      222           
  Lines       24661    24661           
  Branches     8949     8949           
=======================================
  Hits        23605    23605           
  Misses        433      433           
  Partials      623      623           
Files with missing lines Coverage Δ
src/signals/engine.ts 97.36% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@luciferlive112116 luciferlive112116 changed the title fix(signals): match hyphenated refactor-only no-issue rationale fix(signals): match hyphenated ci- and refactor-only no-issue rationale Jul 1, 2026
@luciferlive112116
luciferlive112116 force-pushed the fix/signals-refactor-only-no-issue-rationale branch from 4d443cd to 9113e46 Compare July 1, 2026 11:07
@luciferlive112116 luciferlive112116 changed the title fix(signals): match hyphenated ci- and refactor-only no-issue rationale fix(signals): match hyphenated refactor-only no-issue rationale Jul 1, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@luciferlive112116
luciferlive112116 force-pushed the fix/signals-refactor-only-no-issue-rationale branch from 9113e46 to 7183e19 Compare July 1, 2026 11:17

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflicts:

This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/2271/conflicts) or the command line to resolve conflicts before continuing.

src/signals/engine.ts
test/unit/signals-v2.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants