fix(engine): cap predicted-gate's local linked-issue extractor at the canonical 50 (#6771) - #6857
Conversation
… canonical 50 (JSONbored#6771) predicted-gate-engine.ts's local extractLinkedIssueNumbers says it matches the canonical src/db/repositories.ts extractor, but collected every match uncapped — while the real one stops at MAX_LINKED_ISSUE_NUMBERS = 50. A PR body can easily fit 50+ short closing refs inside the 20k-char truncation this runs on, so the miner's local linked-issue set could diverge from what the maintainer-side gate computes, undermining the module's prediction-parity guarantee. Apply the same 50 ceiling (local literal, cross-referenced in a comment, since this module stays host-import-free by design). Closes JSONbored#6771
|
🚨 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 #6857 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 684 684
Lines 68193 68194 +1
Branches 18707 18707
=======================================
+ Hits 63858 63859 +1
Misses 3350 3350
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:06:15 UTC
Review summary Nits — 4 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
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
predicted-gate-engine.ts's localextractLinkedIssueNumbersdocuments itself as matching "the canonicalsrc/db/repositories.tsextractor" — but that one caps atMAX_LINKED_ISSUE_NUMBERS = 50(extractLinkedIssueNumbersWithOverflowstops collecting once reached), while the local copy collected every match uncapped.MAX_LINKED_ISSUE_NUMBERSinsrc/db/repositories.tsas the drift guard, per the issue's stated options.Closes #6771
Test plan
#N, 18 qualifiedowner/repo#N, 18 full-URL) now yields exactly 50 linked issues — and the result stays deduped and all-positive (the cap truncates, it doesn't corrupt). Added to the existingpredicted-gate-engine-coverage.test.tsrather than a new file.predicted-gate-engine-coverage+predicted-gate-engine-branch-coveragegreen (31 tests).npm run test --workspace @loopover/enginegreen — 588 pass / 0 fail.npm run typecheckclean.