test(#4594): add threshold validation tests for scorecard constants - #4595
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add unit tests that call validateThresholdNumberIntervals for each built-in ThresholdConfig to assert their correctness at test time, preventing invalid threshold definitions from breaking the scorecard plugin at startup. Tests added for: - PERCENTAGE_THRESHOLDS (code-coverage) - DEPENDABOT_THRESHOLDS (dependabot) - OPENSSF_THRESHOLDS (openssf) - SONARQUBE_NUMBER_THRESHOLDS (sonarqube, all 11 metrics) - DEFAULT_NUMBER_THRESHOLDS (scorecard-common, in scorecard-node) Export PERCENTAGE_THRESHOLDS from CodeCoverageMetricProvider.ts so the test file can import it directly. This is not re-exported from the package public API. Closes #4594
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
|
|
🤖 Finished Review · ✅ Success · Started 6:48 AM UTC · Completed 6:56 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $2.18 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4595 +/- ##
=======================================
Coverage 62.38% 62.38%
=======================================
Files 2607 2607
Lines 104756 104756
Branches 29438 29436 -2
=======================================
Hits 65347 65347
Misses 37580 37580
Partials 1829 1829
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Review — ✅ ApprovePR: #4595 — test(#4594): add threshold validation tests for scorecard constants SummaryThis PR adds unit tests that call
Review dimensions
Production change assessmentThe sole production change (
No blocking findings. The change is well-scoped, correctly implemented, and safe to merge. |
imykhno
left a comment
There was a problem hiding this comment.
The implemented logic looks good to me. However, are we planning to add tests for the following:
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |



Add unit tests that call validateThresholdNumberIntervals for each built-in ThresholdConfig to assert their correctness at test time, preventing invalid threshold definitions from breaking the scorecard plugin at startup.
Tests added for:
Export PERCENTAGE_THRESHOLDS from CodeCoverageMetricProvider.ts so the test file can import it directly. This is not re-exported from the package public API.
Closes #4594
Post-script verification
agent/4594-threshold-validation-tests)9b57fa7595438dfd9f603e842d6d8fd4706498f5..HEAD)