Skip to content

feat(enrichment): add deprecated / unmaintained dependency analyzer#3637

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
e11734937-beep:feat/deprecated-dep-analyzer
Jul 5, 2026
Merged

feat(enrichment): add deprecated / unmaintained dependency analyzer#3637
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
e11734937-beep:feat/deprecated-dep-analyzer

Conversation

@e11734937-beep

Copy link
Copy Markdown
Contributor

Closes #1511

What

Adds a deprecatedDep REES analyzer that flags a direct dependency a PR newly adds or upgrades when that package is officially deprecated or unmaintained and a maintained successor exists — an adoption risk + future supply-chain liability the no-checkout headless reviewer cannot see from the diff alone.

How

Pure local, deterministic, no-network analyzer (cost: "local", requires: ["files"]), matching the established offline-list approach the typosquat analyzer already uses for its popular-package set:

  • Reuses the shared manifest parser extractDependencyChanges (same parser dependency-scan, typosquat, and heavy-dependency use), so only deps present after the change are considered — removals are never flagged.
  • Matches each added/upgraded package name (PEP 503-normalized for PyPI, case-folded for npm) against a bundled, curated list of well-known deprecated packages per ecosystem (npm + PyPI).
  • Conservative + fail-safe: only an exact match against the bundled list is reported, so a package it does not name is never flagged; returns [] on an aborted signal or absent patches; bounded by manifest, patch-line, and finding caps.
  • Reports ecosystem, package, added version, direction (add/change), the documented reason, and the recommended replacement — never manifest contents.

Wiring (established 10-file pattern)

  • review-enrichment/src/analyzers/deprecated-dep.ts — the analyzer
  • registry.ts (import + descriptor, appended last), render.ts (brief section), types.ts (DeprecatedDependencyFinding + BriefFindings key)
  • src/review/enrichment-analyzer-names.ts — one canonical name entry (deprecatedDep)
  • review-enrichment/analyzer-metadata.json, apps/gittensory-ui/src/lib/rees-analyzers.ts, .env.example — regenerated via npm run rees:metadata
  • review-enrichment/test/deprecated-dep.test.ts (units, full analyzer branch coverage) + analyzer-registry.test.ts (stable-order entry)

Verification

  • npm run typecheck — clean
  • npm run rees:test — all units pass, incl. metadata:check and sourcemap validation
  • npm run ui:typecheck / npm run ui:lint / npm run ui:test — 0 errors
  • git diff --check — clean
  • No engine conflict; the analyzer is outside the engine tsc/vitest/codecov scope, so the only codecov-measured change is the one canonical name entry (covered by the existing config test).

Add a local, deterministic deprecatedDep REES analyzer that flags a direct
dependency a PR newly adds or upgrades when it is an officially deprecated or
unmaintained package with a maintained successor. Reuses the shared manifest
parser and matches added/upgraded names against a bundled curated list per
ecosystem (npm + PyPI); no network, no token. Conservative and fail-safe:
only exact list matches are reported, bounded by manifest/patch/finding caps.

Closes JSONbored#1511
@e11734937-beep
e11734937-beep requested a review from JSONbored as a code owner July 5, 2026 20:55
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.20%. Comparing base (5bc2711) to head (05718ff).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3637   +/-   ##
=======================================
  Coverage   93.20%   93.20%           
=======================================
  Files         313      313           
  Lines       31910    31910           
  Branches    11677    11677           
=======================================
  Hits        29741    29741           
  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 added the gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 21:03:27 UTC

10 files · 1 AI reviewer · no blockers · readiness 62/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
Adds a new `deprecatedDep` REES analyzer that flags direct npm/PyPI dependencies newly added or upgraded to a version matching a small bundled list of known-deprecated packages, wired through the full 10-file registry/types/render/UI-metadata pattern already used by `typosquat`/`dependency-scan`. The implementation reuses `extractDependencyChanges` correctly (so removals are never flagged), is bounded by manifest/patch-line/finding caps, and is backed by solid unit tests covering add/change/ignore/PyPI-normalization/null-replacement/fail-safe/render paths. This is a low-risk, local/no-network analyzer that follows established conventions closely, with no correctness issues visible in the diff.

Nits — 6 non-blocking
  • The curated `DEPRECATED` list in deprecated-dep.ts is small and will require ongoing manual maintenance to stay useful; consider noting in the PR/issue how additions to this list will be reviewed over time.
  • The bound constants (20, 500, 25) are duplicated as literals across registry.ts's descriptor `limits` and the generated rees-analyzers.ts rather than sourced from the analyzer's own MAX_* constants, though this mirrors the existing pattern for other analyzers so it's not new debt introduced by this PR.
  • `bower` is listed under the npm ecosystem table even though bower isn't installed as an npm dependency in typical manifests — harmless since it only matches if literally declared as an npm dep, but worth double-checking it's not meant for a different ecosystem key.
  • Confirm the linked issue feat(enrichment): Package maintenance-health / deprecated-dep scorer #1511 scope (deprecated-dep matching) is the intended full scope versus a broader 'maintenance-health scorer', since the external history note flagged partial issue coverage — worth a one-line callout in the PR description if this is intentionally a first slice.
  • Consider extracting the manifest/patch-line/finding-cap literals into shared named constants imported by both registry.ts and the generated rees-analyzers.ts to avoid drift, as a follow-up across all analyzers rather than in this PR alone.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1511
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 41 registered-repo PR(s), 20 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor e11734937-beep; Gittensor profile; 41 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: e11734937-beep
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 41 PR(s), 0 issue(s).
  • Related work: Titles/paths share 5 meaningful terms. (issue #1514, issue #1509)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 73423c8 into JSONbored:main Jul 5, 2026
9 checks passed
@loopover-orb loopover-orb Bot added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. labels Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(enrichment): Package maintenance-health / deprecated-dep scorer

1 participant