fix(signals): match hyphenated docs-only no-issue rationale - #1905
Conversation
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.
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-06-30 22:30:13 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Summary
hasClearNoIssueRationaleinsrc/signals/engine.tsis 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 asdocs? only— a literal space — so the hyphenateddocs-only/doc-onlyspelling (the dominant GitHub / Conventional-Commits form, and the exact spelling this function's own docstring andslop.ts's comment use) was missed.Consequence: a docs-only PR with no linked issue, titled e.g.
docs-only: …, on a repo withlinkedIssueGateMode === "block", hitshardLinkedIssueBlock(engine.ts:4246, 4486) and is driven to afailuregate 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 matchesdocs only,docs-only, anddoc-onlywhile leaving every other case unchanged.No linked issue — this repo's
linkedIssuePolicyispreferred, and this is a small, self-evident one-token regex correctness fix in a single shared helper.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run typechecknpm run test:coveragelocally; 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-policysuites all pass.If any required check was skipped, explain why:
src/signals; it touches no API schema, wrangler binding, migration, or UI, so OpenAPI/cf-typegen/migration regeneration is not applicable.Safety
Notes
hasClearNoIssueRationale({ title: "docs-only: clarify README", body: "" })returnedfalse(should betrue);"docs only: …"returnedtrue. The fix makes both — plus"doc-only update"and a body containing "…a docs-only change." — returntrue, while unrelated text like "Add documentation site" still returnsfalse.