feat: add project comparison and benchmarking endpoints (#146)#146
Merged
AbelOsaretin merged 1 commit intoJun 27, 2026
Conversation
|
@KingFRANKHOOD Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add two new feature areas to the API: Project Comparison and Benchmarking against Industry Standards.
Closes #42
Closes #43
Closes #44
Closes #45
Project Comparison Endpoints
GET/v1/comparison?ids=1,2,3GET/v1/comparison/metricsGET/v1/comparison/ranking?ids=1,2,3&criteria=green_impactGET/v1/comparison/export?ids=1,2,3GET/v1/comparison/ranking/export?ids=1,2,3&criteria=combined_scoreAcceptance criteria covered:
Benchmarking Endpoints
GET/v1/benchmarking/benchmarksGET/v1/benchmarking/benchmarks/:idPOST/v1/benchmarking/benchmarksGET/v1/benchmarking/:idGET/v1/benchmarking/:id/percentiles?metric=credit_qualityGET/v1/benchmarking/:id/alertsGET/v1/benchmarking/:id/trend?metric=credit_quality&benchmark=credit_qualityAcceptance criteria covered:
Files Changed
src/index.ts— register new routes under/v1and/apisrc/lib/comparison.ts— service layer for multi-project comparison, ranking, and CSV exportsrc/routes/comparison.ts— route handlers for comparison endpointssrc/lib/benchmarking.ts— service layer for benchmark evaluation, percentiles, alerts, and trend analysissrc/routes/benchmarking.ts— route handlers for benchmarking endpointssrc/__tests__/comparison.test.ts— 9 tests covering all comparison endpointssrc/__tests__/benchmarking.test.ts— 10 tests covering all benchmarking endpointsTesting
All 64 tests pass (45 pre-existing + 19 new).