From af36f41c4d10c43b95d8da9de94e36c055e79260 Mon Sep 17 00:00:00 2001 From: Robert Myers Date: Tue, 7 Jul 2026 14:45:13 -0500 Subject: [PATCH] fix: use actual level in verified_points instead of hardcoded value - Replace hardcoded level=1 with CalculateLevel() matchong display layer - removed TODO comment as the fix is now in place Closes: #236 --- internal/metrics/service.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/metrics/service.go b/internal/metrics/service.go index f9fa4b2..de40ce2 100644 --- a/internal/metrics/service.go +++ b/internal/metrics/service.go @@ -120,8 +120,7 @@ func (s *Scanner) RunScan(ctx context.Context, project db.Project, updatedBy uui // Update verified_points for all boards of this project. totalScore := 0 for _, mr := range results { - // TODO(rmyers): we need to add level to the scoring - totalScore += int(mr.Score * 1 * 2) + totalScore += int(mr.Score * CalculateLevel(mr.Score) * 2) } if totalScore > 0 { if err := s.queries.UpdateBoardVerifiedPointsByProjectID(ctx, db.UpdateBoardVerifiedPointsByProjectIDParams{