Skip to content

fix(signals): match hyphenated docs-only no-issue rationale - #1905

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
ultrahighsuper:fix/docs-only-no-issue-rationale
Jun 30, 2026
Merged

fix(signals): match hyphenated docs-only no-issue rationale#1905
JSONbored merged 1 commit into
JSONbored:mainfrom
ultrahighsuper:fix/docs-only-no-issue-rationale

Conversation

@ultrahighsuper

Copy link
Copy Markdown
Contributor

Summary

hasClearNoIssueRationale in src/signals/engine.ts is the single shared definition of a "clear no-issue rationale" used by the deterministic no-linked-issue slop signal (slop.ts), the public PR-panel traceability check, and the hard linked-issue gate. Its regex matched the documentation rationale only as docs? only — a literal space — so the hyphenated docs-only / doc-only spelling (the dominant GitHub / Conventional-Commits form, and the exact spelling this function's own docstring and slop.ts's comment use) was missed.

Consequence: a docs-only PR with no linked issue, titled e.g. docs-only: …, on a repo with linkedIssueGateMode === "block", hits hardLinkedIssueBlock (engine.ts:4246, 4486) and is driven to a failure gate conclusion — which the engine auto-closes — despite carrying a valid no-issue rationale. It also misfires the slop signal, shows "Missing" on the traceability panel, and docks the readiness score.

Fix: widen the alternative to docs?[\s-]+only, which matches docs only, docs-only, and doc-only while leaving every other case unchanged.

No linked issue — this repo's linkedIssuePolicy is preferred, and this is a small, self-evident one-token regex correctness fix in a single shared helper.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run typecheck
  • npm run test:coverage locally; the changed line is covered by a new regression test (hasClearNoIssueRationale docs-only spelling) asserting the space, hyphenated, embedded, and negative cases. The test was confirmed to FAIL against the unpatched regex (expected false to be true) and pass after the fix. Downstream consumers stay green: slop, linked-issue-hard-rules, predicted-gate, gate-check-policy suites all pass.
  • New or changed behavior has unit tests for the new and negative paths

If any required check was skipped, explain why:

  • The change is one regex character class in a pure exported helper in src/signals; it touches no API schema, wrangler binding, migration, or UI, so OpenAPI/cf-typegen/migration regeneration is not applicable.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — no such changes.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (Gate/slop/traceability now read a valid docs-only rationale correctly; schema unchanged.)
  • No visible UI change in this PR.

Notes

  • Reproduction: hasClearNoIssueRationale({ title: "docs-only: clarify README", body: "" }) returned false (should be true); "docs only: …" returned true. The fix makes both — plus "doc-only update" and a body containing "…a docs-only change." — return true, while unrelated text like "Add documentation site" still returns false.

hasClearNoIssueRationale matched only the space form "docs only" via `docs?
only`, missing the hyphenated "docs-only" / "doc-only" spelling — the dominant
GitHub / Conventional-Commits form, and the one this function's own docstring
uses. A docs-only PR with no linked issue was therefore denied a clear no-issue
rationale and hard-blocked under linkedIssueGateMode === "block" (the gate then
auto-closes it). Widen the alternative to `docs?[\s-]+only` and cover the
hyphenated, embedded, and negative cases.
@dosubot dosubot Bot added the size:XS label Jun 30, 2026
@loopover-orb

loopover-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Tip

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

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-06-30 22:30:13 UTC

2 files · 1 AI reviewer · no blockers · readiness 73/100 · CI green · unknown

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This change correctly widens the shared clear no-issue rationale matcher from only `docs only`/`doc only` to also accept the conventional hyphenated forms. The regex remains scoped to the existing rationale alternatives and the new unit coverage exercises space, hyphenated title, hyphenated body, and negative cases. Because the helper is shared by the deterministic signal, traceability panel, and linked-issue gate, the one-line matcher fix is the right layer for this behavior.

Nits — 3 non-blocking
  • nit: `src/signals/engine.ts:4956` now has a fairly long explanatory comment for a small regex tweak; consider trimming it after this regression is covered by the test name and assertions.
  • `test/unit/signals-v2.test.ts:1722` could add a mixed-case assertion such as `Docs-Only: clarify README` to document that the existing `/i` behavior still covers title casing.
  • 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 ✅ 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: 5 registered-repo PR(s), 4 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor ultrahighsuper; Gittensor profile; 5 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: ultrahighsuper
  • 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: 5 PR(s), 0 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

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 30, 2026
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