fix(review): avoid review effort boundary undercounts - #4139
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4139 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 384 384
Lines 36007 36008 +1
Branches 13213 13213
=======================================
+ Hits 33733 33734 +1
Misses 1618 1618
Partials 656 656
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 07:35:13 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 2 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.
|
Motivation
bandFromMinutesreconstructed effort asminutes / MINUTES_PER_EFFORT, which can map rounded boundary minutes down into the previous complexity band.avgBandvalues when folding persisted minutes into aggregates, affecting analytics accuracy (non-security, correctness only).Description
bandFromMinutesto treat a persisted rounded minutes value as representing any effort up tominutes + 0.5, computingmaxRepresentedEffort = (Math.max(0, minutes) + 0.5) / MINUTES_PER_EFFORTand returningbandForEffort(maxRepresentedEffort).test/unit/review-effort.test.tsandtest/unit/stats.test.tsthat assert boundary-rounded minutes map to the higher possible band and that aggregates reflect that.estimateReviewEffortbehavior and total minutes folding; this change only adjusts band reconstruction from persisted minutes.Testing
npx vitest run test/unit/review-effort.test.ts test/unit/stats.test.ts --pool=forks, and both test files passed (43 tests).npm run typecheckand verifiedgit diff --check, both succeeded locally.npm run test:coverage, but coverage remapping failed during generation withTypeError: jsTokens is not a function, so an unsharded coverage report could not be completed in this environment despite the targeted tests passing.npm audit --audit-level=moderatecould not complete due to the registry returning403 Forbiddenfrom the audit endpoint in this environment.Codex Task