fix(mcp): align linked-issue extraction with server after #4039 - #4057
fix(mcp): align linked-issue extraction with server after #4039#4057RealDiligent wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-07 18:32:11 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
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.
|
Port inline code-span stripping and qualified owner/repo#N scoping from repositories.ts (JSONbored#4039/JSONbored#3862) into the MCP local-branch mirror and the predicted-gate engine so template checklist text does not spuriously link issue JSONbored#123 and branch-analysis gate predictions match server preflight. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; AI reviewers agree on a likely critical defect: Per this repo's contribution policy, an external contributor PR must close or clearly link an eligible upstream issue, and the description itself states no such issue exists yet (only a fork-tracked issue at RealDiligent#4, which isn't in this repo) — this needs a real `gittensor:bug` issue linked before merge.; duplicate of another open PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4057 +/- ##
=======================================
Coverage 93.59% 93.59%
=======================================
Files 379 379
Lines 35584 35591 +7
Branches 13050 13051 +1
=======================================
+ Hits 33304 33311 +7
Misses 1618 1618
Partials 662 662
🚀 New features to boost your workflow:
|
|
CI is fully green on the rebased squashed commit (validate-code pass, codecov/patch 100%). Fix is ready to merge once a contributor-eligible upstream tracking issue exists — please create a \gittensor:bug\ issue and reopen with \Closes #…, or manually associate this PR. Fork tracking: RealDiligent#4. |
Summary
Ports the canonical server-side linked-issue extractor from
repositories.ts(#4039 inline code-span stripping + #3862 qualifiedowner/repo#Nscoping) into:packages/gittensory-mcp/lib/local-branch.jsextractLinkedIssues(text, repoFullName)packages/gittensory-engine/src/signals/predicted-gate-engine.tsextractLinkedIssueNumbersRoot cause
The MCP local-branch analyzer and predicted-gate engine still scanned raw PR body text. This repo's own PR template checklist contains
(e.g.Closes #123), so every local branch analysis that keeps that line spuriously reportslinkedIssues: [123]. Those values are POSTed to/v1/local/branch-analysisand merged server-side, corrupting predicted-gate verdicts and collision signals.Fix
Mirror
extractLinkedIssueNumbersWithOverflowlogic: strip inline code spans before scanning, honor qualified refs only whenowner/repomatches, dedupe, passrepoFullNamefromcollectLocalBranchMetadata.Impact
Local MCP users and miners running gate prediction no longer get false linked-issue matches from template boilerplate;
predictedGatealigns with serverpreflight.Tracking issue (needed before merge)
No contributor-eligible upstream issue exists yet (maintainer #4039 merged without one;
CreateIssuedenied for external contributors). Fork tracking: RealDiligent#4. Please create/associate agittensor:bugupstream issue so this PR can addCloses #…per CONTRIBUTING.Supersedes closed #4054 (rebased onto latest
main, squashed, codecov tests expanded).Test plan
npm run typechecknpm run build:mcpnpx vitest run test/unit/local-branch.test.ts test/unit/predicted-gate-engine-branch-coverage.test.ts test/unit/db-parsers.test.ts(107/107)