feat(review): add deterministic per-PR review-effort estimator - #2924
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-04 05:39:01 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2924 +/- ##
=======================================
Coverage 96.05% 96.05%
=======================================
Files 258 259 +1
Lines 28448 28460 +12
Branches 10349 10350 +1
=======================================
+ Hits 27326 27338 +12
Misses 489 489
Partials 633 633
🚀 New features to boost your workflow:
|
Summary
Adds a pure, deterministic per-PR review-effort estimator as
src/review/review-effort.ts: given the changed files and their patches, it weights each file's added-line count by its category, adds a fixed per-file overhead, and maps the total to a 1-5 complexity band plus a rounded minutes estimate. No AI, no IO. Standalone (no wiring); consumed by the ROI and unified-comment surfaces in follow-up issues.Closes #2068
Deliverables
estimateReviewEffort(files): { band: 1 | 2 | 3 | 4 | 5; minutes: number }- pure and deterministic.addedLineCount(src/review/review-diff.ts) andclassifyChangedFilecategory weights (src/signals/path-matchers.ts): genuine source costs the most to review; machine-produced/imported content (minified/generated/vendored/lockfiles) the least; docs/config/tests sit in between. The weighting is a single auditableRecord<ChangedFileCategory, number>table, not a branch chain.Validation
npm run typecheckis clean.