Skip to content

feat(enrichment): unused-export / dead-on-arrival detector analyzer#3584

Closed
james3773 wants to merge 1 commit into
JSONbored:mainfrom
james3773:feat/enrichment-unused-export-analyzer-2025
Closed

feat(enrichment): unused-export / dead-on-arrival detector analyzer#3584
james3773 wants to merge 1 commit into
JSONbored:mainfrom
james3773:feat/enrichment-unused-export-analyzer-2025

Conversation

@james3773

Copy link
Copy Markdown
Contributor

Summary

Closes #2025.

Adds a github-light REES analyzer that flags exports newly introduced by a PR with zero non-declaration references anywhere in the repo. Parses added top-level export declarations from the diff, resolves each symbol via bounded GitHub Code Search (repo-scoped, injected fetch), and reports dead-on-arrival surface for reviewers.

  • UnusedExportFinding + unusedExport brief key
  • review-enrichment/src/analyzers/unused-export.ts with maxSymbols / maxSearches caps and fail-safe skip on missing token/head SHA or search errors
  • Registry descriptor, render wiring, metadata regen, and unit tests (unreferenced flagged, referenced not flagged, search cap, token-absent skip)

Test plan

  • npm --prefix review-enrichment run build
  • npm --prefix review-enrichment run metadata
  • npm --prefix review-enrichment test (1082 passed)
  • npm run typecheck
  • npm run rees:test

Made with Cursor

Detect newly added exports with zero non-declaration references via bounded GitHub Code Search, closing the net-new export slice of caller-impact work tracked in JSONbored#2025.

Co-authored-by: Cursor <cursoragent@cursor.com>
@james3773
james3773 requested a review from JSONbored as a code owner July 5, 2026 18:00
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 5, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

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

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

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (7d0e2c4) to head (4dd70f2).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3584   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files         311      311           
  Lines       31750    31750           
  Branches    11612    11612           
=======================================
  Hits        29581    29581           
  Misses       1517     1517           
  Partials      652      652           
Files with missing lines Coverage Δ
src/review/enrichment-analyzer-names.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-05 18:05:04 UTC

10 files · 1 blocker · readiness 80/100 · CI pending · blocked

🛑 Suggested Action - Reject/Close

  • AI review already in progress for this PR head: Another Gittensory pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another Gittensory pass. Gittensory is holding this PR for manual review until that pass completes.

Nits — 1 non-blocking
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

Why this is blocked

  • Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
Signal Result Evidence
Code review ❌ 1 blocker No AI review summary
Linked issue ✅ Linked #2025
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 (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 1054 registered-repo PR(s), 728 merged, 41 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 1054 PR(s), 41 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: jony376
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, Python, JavaScript, Rust, MDX, Clojure, Cuda, Dart
  • Official Gittensor activity: 1054 PR(s), 41 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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.

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

  • Re-run Gittensory review

@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(enrichment): unused-export / dead-on-arrival detector analyzer

1 participant