Skip to content

feat(review): replace flat MINUTES_SAVED_PER_PR with the per-PR effort estimate in public-stats ROI #2070

Description

@JSONbored

Part of #1955. The review-time-saved ROI currently credits a flat 20 min/PR (MINUTES_SAVED_PER_PR, src/review/public-stats.ts:28,295). Replace it with the per-PR estimate from the estimator so the ROI figure is credible. Depends on the estimator module (sibling bounty). Keep the aggregate self-host-only per the epic.

Deliverables

  • Replace the flat reviewed * MINUTES_SAVED_PER_PR sum (src/review/public-stats.ts:295) with a sum of per-PR estimated minutes; retain MINUTES_SAVED_PER_PR only as a documented fallback for PRs lacking a stored estimate
  • Persist or thread the per-PR estimated minutes so the aggregate can sum real values (reuse an existing stored field if present; a migration must be single-file + type-regenerated if needed)
  • Keep the byte-identical zero-review path (minutesSaved: 0, src/review/public-stats.ts:176)
  • Unit tests: mixed-effort PRs sum correctly, fallback used when estimate missing, zero-reviewed ⇒ 0; 97% branch (test the fallback nullish arm)

References

  • src/review/public-stats.ts:28
  • src/review/public-stats.ts:295
  • src/review/public-stats.ts:176
  • #1955

Part of #1955.


size: S · gittensor:feature

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions