feat(enrichment): package maintenance-health / deprecated-dep scorer#1793
feat(enrichment): package maintenance-health / deprecated-dep scorer#1793GildardoDev wants to merge 1 commit into
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-30 06:54:45 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 6 non-blocking
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.
|
406a453 to
b7cc042
Compare
a87ba69 to
270bed4
Compare
…corer for npm and PyPI
270bed4 to
d21573a
Compare
JSONbored
left a comment
There was a problem hiding this comment.
Merge conflicts:
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1793/conflicts) or the command line to resolve conflicts before continuing.
review-enrichment/src/brief.ts
What
A new REES analyzer that flags newly-added or upgraded direct dependencies that are deprecated or yanked by their maintainer, or stale (no release in roughly two years) — maintenance-health and future supply-chain risks the no-checkout reviewer cannot derive.
Data source
Public registry metadata, fetched with an injected fetch. npm: the packument
deprecatedfield (a non-empty string means deprecated, and the maintainer reason is surfaced) and thetimemap for the newest publish date. PyPI:info.yanked(plusyanked_reasonwhen present) and the newest release upload date. Output is public-safe: package@version plus a short factual reason only, with the registry-supplied reason markdown-escaped before it reaches the prompt block. No tokens, paths, or manifest contents.Behavior
Additive and fail-safe: it reuses the existing
extractDependencyChangesto act only on direct added/upgraded deps, bounds the number of registry queries, and returns no finding on a malformed or empty registry response, an unparseable date, or any fetch error. A healthy dependency produces no finding. It follows the established analyzer pattern entirely withinreview-enrichment/(finding type intypes.ts, a pure analyzer with injectedfetchinanalyzers/dep-maintenance-health.ts, registration inbrief.ts, a public-safe block inrender.ts), outside the engine scope. Scorecard, archived, and sole-maintainer signals are intentionally left out to keep this to the two deterministic registry signals.Tests
24
node:testcases with a mockedfetchcover deprecated/yanked/stale detection for npm and PyPI, the healthy no-finding case, and the fail-safe edge cases: package-name and ecosystem validation, scoped-name URL encoding, malformed or missing registry JSON, a boolean or emptydeprecatedvalue, unparseable dates (Number.isFinite guard), query bounding, and direct-only dependency scope. Full suite: rees build clean, 227 of 227 tests pass.Closes #1511