Skip to content

feat(enrichment): Heavy-dependency-for-trivial-use detector #1505

Description

@JSONbored

Context

A REES (review-enrichment service) analyzer. Tier: high-value.

Detects: A newly added heavyweight dep used only trivially in the diff (one import, one call site) — 'added lodash for .get once' / 'added axios for one GET' — plus the raw install/bundle-size delta.

Data source: Shipped manifest extractor + grep of the PR's own changed patches for import/require usage count + packagephobia/bundlephobia/deps.dev for weight. Inputs already in EnrichRequest + one free sizing call.

This is heavy/external/historical analysis the no-checkout headless claude --print reviewer cannot do; the REES returns it as a brief block the engine splices into the review (additive + fail-safe).

Implementation (established pattern, all inside review-enrichment/)

  1. Finding type + BriefFindings key in src/types.ts
  2. src/analyzers/<name>.ts — pure, inject fetch for tests
  3. Register in src/brief.ts ANALYZERS registry
  4. Render a public-safe block in src/render.ts
  5. node:test units against dist/ + a live smoke against the real data source

Deliverables

  • The analyzer + wiring + tests + a verifiable brief block (file:line or package@version)
  • Clean PR off main (zero engine conflict; outside the engine tsc/vitest/codecov scope)

Parent: #1499

Metadata

Metadata

Assignees

Labels

maintainer-onlyWork to be completed solely by jsonbored - yields no gittensor points.

Projects

Status
Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions