feat(enrichment): add churn-hotspot + bug-density scorer analyzer - #1750
feat(enrichment): add churn-hotspot + bug-density scorer analyzer#1750Daedalus-Icarus wants to merge 1 commit into
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-29 21:48:50 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 7 non-blocking
Concerns raised — review before merging
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.
|
97f2c63 to
7402c30
Compare
JSONbored
left a comment
There was a problem hiding this comment.
There are multiple merge conflicts (a PR submitted before yours updated the same files), and also, the gittensory orb review agent identified a few blockers that should be fixed before resubmitting.
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1750/conflicts) or the command line to resolve conflicts before continuing.
review-enrichment/src/brief.ts
review-enrichment/src/render.ts
review-enrichment/src/types.ts
review-enrichment/test/enrichment.test.ts
Closing, feel free to resubmit. I really suggest submitting only one of these, when you see no other feat(enrichment) PRs are open ahead of yours, otherwise it's likely there will be more merge conflicts/churn.
Summary
Adds a REES (review-enrichment service) analyzer that flags changed files which are statistical churn hotspots — high commit frequency AND a high fraction of fix/revert commits in the last 90 days. Defects cluster in such files, so the reviewer scrutinizes harder. This is heavy/historical git-log analysis the no-checkout headless
claude --printreviewer cannot perform; the REES returns it as a brief block the engine splices into the review prompt.The analyzer fetches up to 100 commits per changed file via the GitHub REST commits-by-path endpoint (
GET /repos/{owner}/{repo}/commits?path=<file>&since=<90d>&per_page=100) and classifies each commit subject locally. A file is flagged when it carries ≥10 commits AND ≥30% fix/revert — the two together keep the signal high-precision (a busy file with few fixes is just active; a quiet file with two fixes is not a cluster).Closes #1513.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateSafety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Notes
codeowners.tsprecedent): any network error or non-ok response yields[]; one file's failure does not abort the rest; only an abort signal propagates asanalyzer_abortedso the orchestrator marks the briefpartial.safeCodeSpan(the same path-forgery guard the other render blocks use).MIN_COMMITS=10,MIN_FIX_REVERT_RATE=0.3,MAX_FILES_SCANNED=15,LOOKBACK_DAYS=90) are committed as named constants at the top of the analyzer, matching how every other analyzer exposes its tuning knobs.fix:/revert:/bugfix:/hotfix:) or git'sRevert "prefix — linear-time, no backtracking risk on adversarial input (the same ReDoS disciplinesecret-log.tsdocuments).