Skip to content

fix(api): remove duplicate finding-taxonomy/enrichment-analyzers imports - #6722

Merged
JSONbored merged 1 commit into
mainfrom
fix/duplicate-taxonomy-imports
Jul 17, 2026
Merged

fix(api): remove duplicate finding-taxonomy/enrichment-analyzers imports#6722
JSONbored merged 1 commit into
mainfrom
fix/duplicate-taxonomy-imports

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • src/api/routes.ts imported buildFindingTaxonomyDocument and buildEnrichmentAnalyzersTaxonomyDocument twice — once near the top of the import block, again a bit lower (introduced by feat(mcp): REST routes + CLI resource mirrors for finding-taxonomy and enrichment-analyzers #6709). This breaks tsc --noEmit with TS2300 duplicate-identifier errors, which red-CIs typecheck for any branch currently built on top of main.
  • Removes the duplicate pair of import lines. No behavior change — both route handlers (/v1/mcp/finding-taxonomy, /v1/finding-taxonomy, /v1/mcp/enrichment-analyzers, /v1/enrichment-analyzers) are unaffected; they still resolve to the same single import.

Scope

  • Conventional Commit title.
  • Focused, single-purpose fix.
  • No linked issue — trivial, obvious CI-breaking duplicate-import fix with zero behavior change (maintainer PR).

Validation

  • git diff --check
  • npm run typecheck (was failing with TS2300 before this fix, clean after)
  • npx vitest run test/integration/api.test.ts test/unit/mcp-pr-ai-review-findings.test.ts (routes touching the affected imports, all green)

Safety

  • No secrets/behavior changes; pure duplicate-import removal.

src/api/routes.ts imported buildFindingTaxonomyDocument and
buildEnrichmentAnalyzersTaxonomyDocument twice (introduced by #6709), which
broke `tsc --noEmit` with TS2300 duplicate-identifier errors and red-CI'd
typecheck for any branch built on top of main. No behavior change -- both
route handlers using these functions are unaffected.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@e592d90). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6722   +/-   ##
=======================================
  Coverage        ?   95.87%           
=======================================
  Files           ?      599           
  Lines           ?    47560           
  Branches        ?    15072           
=======================================
  Hits            ?    45598           
  Misses          ?     1163           
  Partials        ?      799           
Flag Coverage Δ
shard-1 43.88% <ø> (?)
shard-2 36.94% <ø> (?)
shard-3 32.36% <ø> (?)
shard-4 34.24% <ø> (?)
shard-5 31.41% <ø> (?)
shard-6 45.78% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/api/routes.ts 94.62% <ø> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-17 04:32:37 UTC

1 file · 1 AI reviewer · 2 blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a trivial, correct fix that removes a duplicate pair of import statements (buildFindingTaxonomyDocument, buildEnrichmentAnalyzersTaxonomyDocument) from src/api/routes.ts that were causing TS2300 duplicate-identifier errors introduced by #6709. The remaining single import of each symbol (visible just above the removed lines in the diff context) still resolves correctly for the route handlers, so there is no behavior change. CI is green including typecheck, corroborating the fix works as intended.

Nits — 3 non-blocking
  • No linked issue is referenced, though the PR description explicitly justifies this as a trivial maintainer CI-fix exempt from that requirement.
  • Consider a lint rule (e.g. no-duplicate-imports) to catch this class of merge-induced duplicate import in CI before it reaches a red typecheck.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.

Decision drivers

  • ❌ Code review — 2 blockers (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 33 registered-repo PR(s), 26 merged, 261 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 33 PR(s), 261 issue(s).
Improvement ℹ️ None detected risk: low · value: none · LLM: minor
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 33 PR(s), 261 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 17, 2026
@JSONbored
JSONbored merged commit 3de7c25 into main Jul 17, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/duplicate-taxonomy-imports branch July 17, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant