fix(miner): require a closing keyword in self-review's linked-PR extractor (#6769) - #6862
Conversation
…actor (JSONbored#6769) self-review-context.js's LINKED_PR_PATTERN was a bare /PR|pull request #N/ with no closing-keyword requirement, despite claiming to mirror the host's extractLinkedPrNumbers exactly. The host requires close/fix/resolve precisely to avoid counting an incidental mention (its own #issue-body-pr-mention-pollution fix); the miner's copy never got it. So a body saying "similar to what we saw in PR JSONbored#501" populated linkedPrs, the issue-quality report read the issue as "already references a PR", and the miner skipped an available issue. Mirror the host pattern and correct the comment. Closes JSONbored#6769
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6862 +/- ##
=======================================
Coverage 93.64% 93.65%
=======================================
Files 685 685
Lines 68239 68239
Branches 18707 18707
=======================================
+ Hits 63904 63906 +2
+ Misses 3350 3348 -2
Partials 985 985
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-17 09:22:30 UTC
Review summary Nits — 3 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
self-review-context.js'sLINKED_PR_PATTERNwas a bare/\b(?:PR|pull request)\s+#(\d+)\b/gi— no closing-keyword requirement — while claiming to mirrorsrc/db/repositories.ts'sextractLinkedPrNumbers"exactly". Verified against current host source: the host requires aclose[sd]?|fix(?:e[sd])?|resolve[sd]?prefix, specifically to avoid counting an incidental mention (its own#issue-body-pr-mention-pollutionfix). The miner's copy never received it.Impact: an issue body saying "similar to what we saw in PR #501" populated
toIssueRecord'slinkedPrs, which the engine's issue-quality report surfaces as "already references a PR" — so the miner skipped an issue that was actually available./\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+(?:PR|pull request)\s+#(\d+)\b/gi.Closes #6769
Test plan
"...similar to what we saw in PR #501, worth a look."body now yieldslinkedPrs: []."Closes PR #501"body still yieldslinkedPrs: [501](no over-rejection).Closes PR #501still matches 1.test/unit/miner-self-review-context.test.tsgreen (30 tests); extended the existing file rather than adding a parallel one.npm run typecheckclean.