Skip to content

fix(signals): match hyphenated test-only no-issue rationale - #1993

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
luciferlive112116:fix/signals-test-only-no-issue-rationale
Jul 1, 2026
Merged

fix(signals): match hyphenated test-only no-issue rationale#1993
JSONbored merged 1 commit into
JSONbored:mainfrom
luciferlive112116:fix/signals-test-only-no-issue-rationale

Conversation

@luciferlive112116

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 it recognizes docs-only rationales in both space and hyphenated forms (docs only, docs-only), but the same Conventional Commits spelling for test-only PRs was still missed.

Consequence: a test-only PR with no linked issue — e.g. test-only: lock regression for … — on a repo with linkedIssueGateMode === "block" can hit hardLinkedIssueBlock, fail the gate, and be auto-closed despite a valid rationale. It also misfires the slop signal and shows "Missing" on the traceability panel.

Fix: widen the alternative to tests?[\s-]+only, matching test only, test-only, tests only, and tests-only while leaving unrelated PR text 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 fix (#1905).

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npm run test:coverage — new hasClearNoIssueRationale test-only spelling tests cover space, hyphenated, embedded body, and negative cases on the changed regex branch.
  • 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: "test-only: lock regression", body: "" }) returned false (should be true); "test only: …" also returned false. After the fix both return true; "Add tests for classifier" still returns false.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-01 07:25:42 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The change widens the shared no-issue rationale matcher to recognize both singular/plural and hyphenated/spaced test-only wording, matching the PR's stated gate/slop/traceability path because all callers use this helper. The added tests exercise the new positive spellings and a couple of unrelated test-wording negatives, and the regex remains consistent with the existing docs-only treatment. I do not see a reachable correctness break in the visible diff.

Nits — 2 non-blocking
  • nit: src/signals/engine.ts:4961 broad `tests?[\s-]+only` matching anywhere in title/body can classify incidental prose like “run tests only on Node 22” as a clear no-issue rationale; consider tightening it to a Conventional Commit prefix or rationale sentence if that is not intended.
  • test/unit/signals-v2.test.ts:1769 Add a negative case for incidental ordering/scope prose such as `Run tests only on Linux` so the intended breadth of `tests?[\s-]+only` is locked down.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR; address the blocker before review.
Contributor workload ✅ 10/10 Author activity: 15 registered-repo PR(s), 5 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 15 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: 15 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Fix the blocker.
  • 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.
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

@dosubot dosubot Bot added the lgtm label Jul 1, 2026
@JSONbored
JSONbored merged commit a7fbc49 into JSONbored:main Jul 1, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 1, 2026
@JSONbored JSONbored removed the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants