fix(mcp): align linked-issue extraction with server after #4039 - #4054
fix(mcp): align linked-issue extraction with server after #4039#4054RealDiligent wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
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>
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-07 16:20:06 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.
|
|
Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; AI reviewers agree on a likely critical defect: No linked/associated eligible open issue: the PR description itself states none exists and explicitly asks a maintainer to file a `gittensor:bug` tracking issue before merge, which this repo's contributor-PR policy requires regardless of fix quality.; 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❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (90.90%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4054 +/- ##
==========================================
- Coverage 93.59% 93.58% -0.01%
==========================================
Files 379 379
Lines 35575 35582 +7
Branches 13044 13045 +1
==========================================
+ Hits 33295 33301 +6
Misses 1618 1618
- Partials 662 663 +1
🚀 New features to boost your workflow:
|
Summary
Fixes a correctness bug where MCP local-branch analysis and the predicted-gate engine still used a stale linked-issue extractor after server-side fixes in #4039 (inline code spans) and #3862 (qualified
owner/repo#Nscoping).Root cause
packages/gittensory-mcp/lib/local-branch.jsextractLinkedIssues()scanned raw text without stripping markdown inline code. This repo's PR template checklist literally 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, collision signals, and duplicate detection.The predicted-gate engine copy in
packages/gittensory-engine/src/signals/predicted-gate-engine.tshad the same missing code-span strip, causingpredictedGateandpreflightto disagree inside one API response.Fix
repositories.tsextractor logic into MCPextractLinkedIssues(text, repoFullName)repoFullNamefromcollectLocalBranchMetadatapredicted-gate-engineextractLinkedIssueNumberswith the same strip + unified regextest/unit/db-parsers.test.tstemplate-checklist caseImpact
Local MCP users and miners running
gittensory_predict_gateno longer get false linked-issue matches from template boilerplate; gate predictions align with server preflight.Tracking issue
No open contributor-eligible upstream issue exists for this parity gap (maintainer PR #4039 merged without filing one;
CreateIssueis denied for external contributors). Please create/associate agittensor:bugtracking issue before merge per CONTRIBUTING policy.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