diff --git a/services/libs/tinybird/datasources/health_score_copy_ds.datasource b/services/libs/tinybird/datasources/health_score_copy_ds.datasource deleted file mode 100644 index bd7539f7a9..0000000000 --- a/services/libs/tinybird/datasources/health_score_copy_ds.datasource +++ /dev/null @@ -1,63 +0,0 @@ -DESCRIPTION > - - `health_score_copy_ds` contains comprehensive health score metrics and benchmarks for projects and segments. - - Created via copy pipe with computed health metrics for dashboard and analytics consumption. - - Aggregates multiple health dimensions including contributors, popularity, development activity, and security. - - `id` is the unique identifier for the health score record. - - `segmentId` links to the project segment being scored. - - `slug` is the URL-friendly identifier for the project. - - `widgets` is an array of widget types enabled for this project. - - `activeContributors` and `activeContributorsBenchmark` track contributor engagement metrics and percentile rankings. - - `contributorDependencyCount`, `contributorDependencyPercentage`, `contributorDependencyBenchmark` measure contributor concentration risk. - - `organizationDependencyCount`, `organizationDependencyPercentage`, `organizationDependencyBenchmark` measure organizational concentration risk. - - `retentionRate` and `retentionBenchmark` track contributor retention metrics. - - `stars`, `starsBenchmark`, `forks`, `forksBenchmark` measure repository popularity. - - `issueResolution` and `issueResolutionBenchmark` track issue resolution velocity (nullable for projects without issues). - - `pullRequests` and `pullRequestsBenchmark` measure PR activity levels. - - `mergeLeadTime` and `mergeLeadTimeBenchmark` track PR merge velocity (nullable for projects without PRs). - - `activeDaysCount` and `activeDaysBenchmark` measure development activity frequency. - - `contributionsOutsideWorkHours` and `contributionsOutsideWorkHoursBenchmark` track volunteer vs work-based contributions. - - `searchVolumeAverage` and `searchVolumeBenchmark` measure project discoverability. - - `securityCategoryPercentage` is an array of security category scores as tuples of (category, percentage). - - `securityPercentage`, `contributorPercentage`, `popularityPercentage`, `developmentPercentage` are individual health dimension scores. - - `overallScore` is the computed overall health score combining all dimensions. - -SCHEMA > - `id` String, - `segmentId` String, - `slug` String, - `widgets` Array(String), - `activeContributors` UInt64, - `activeContributorsBenchmark` UInt64, - `contributorDependencyCount` UInt64, - `contributorDependencyPercentage` Float64, - `contributorDependencyBenchmark` UInt64, - `organizationDependencyCount` UInt64, - `organizationDependencyPercentage` Float64, - `organizationDependencyBenchmark` UInt64, - `retentionRate` Float64, - `retentionBenchmark` UInt64, - `stars` UInt64, - `starsBenchmark` UInt64, - `forks` UInt64, - `forksBenchmark` UInt64, - `issueResolution` Nullable(Float64), - `issueResolutionBenchmark` UInt64, - `pullRequests` UInt64, - `pullRequestsBenchmark` UInt64, - `mergeLeadTime` Nullable(Float64), - `mergeLeadTimeBenchmark` UInt64, - `activeDaysCount` UInt64, - `activeDaysBenchmark` UInt64, - `contributionsOutsideWorkHours` Float64, - `contributionsOutsideWorkHoursBenchmark` UInt64, - `searchVolumeAverage` Float64, - `searchVolumeBenchmark` UInt64, - `securityCategoryPercentage` Array(Tuple(String, Float64)), - `securityPercentage` Float64, - `contributorPercentage` Float64, - `popularityPercentage` Float64, - `developmentPercentage` Float64, - `overallScore` Float64 - -ENGINE MergeTree -ENGINE_SORTING_KEY slug, id diff --git a/services/libs/tinybird/datasources/insights_projects_populated_ds.datasource b/services/libs/tinybird/datasources/insights_projects_populated_ds.datasource index 7b8c02152c..055d3fc301 100644 --- a/services/libs/tinybird/datasources/insights_projects_populated_ds.datasource +++ b/services/libs/tinybird/datasources/insights_projects_populated_ds.datasource @@ -21,10 +21,13 @@ DESCRIPTION > - `repoData` array contains tuples of (repository, score, rank) for multi-repo projects. - `softwareValue` is the estimated economic value of the software (UInt64). - `contributorCount` and `organizationCount` are computed contributor and organization statistics (UInt64). - - `healthScore` is the overall project health score (Float64). - `status` is the status of the project ex: active or archived - `maturity` is the project maturity stage (e.g. Sandbox, Incubating, Graduated). Empty string when not set. - `lastVulnerabilityScanStatus` is the aggregated vulnerability scan status across all project repositories (`LowCardinality(Nullable(String))`). Possible values: `'success'` (all scans passed), `'no_packages_found'` (no dependency packages detected), `'failure'` (at least one scan failed), `'running'` (scan in progress). NULL when no scan records exist for the project's repositories. + - `healthScoreV2` is the Health Score v2 composite (0-100), copied from `project_insights_copy_ds`. NULL when fewer than 2 categories have data, and for archived projects and `korg`. + - `healthLabel` is the Health Score v2 band ('excellent' to 'critical'), computed on the normalized score. NULL when `healthScoreV2` is NULL. + - `healthScoreV2Normalized` is `healthScoreV2 * 100 / healthMaxScore` (0-100), so partial scores sort on one scale. NULL when `healthScoreV2` or `healthMaxScore` is NULL. + - `healthMaxScore` is the denominator of a partial `healthScoreV2` (60, 65, 75 or 100), copied from `project_insights_copy_ds`. NULL when `healthScoreV2` is NULL. TAGS "Project metadata", "Analytics enrichment" @@ -59,14 +62,17 @@ SCHEMA > `softwareValue` UInt64, `contributorCount` UInt64, `organizationCount` UInt64, - `healthScore` Float64, `communityPlatforms` Array(String), `communityKeywords` Array(String), `communityLanguages` Array(String), `status` String, `maturity` LowCardinality(String), `lastVulnerabilityScanStatus` Nullable(String), - `repoLicenses` Array(Tuple(String, String)) + `repoLicenses` Array(Tuple(String, String)), + `healthScoreV2` Nullable(UInt8), + `healthLabel` Nullable(String), + `healthScoreV2Normalized` Nullable(Float64), + `healthMaxScore` Nullable(UInt8) ENGINE MergeTree ENGINE_PARTITION_KEY toYear(createdAt) diff --git a/services/libs/tinybird/datasources/project_insights_copy_ds.datasource b/services/libs/tinybird/datasources/project_insights_copy_ds.datasource index da0ed7c594..3cd12f843c 100644 --- a/services/libs/tinybird/datasources/project_insights_copy_ds.datasource +++ b/services/libs/tinybird/datasources/project_insights_copy_ds.datasource @@ -1,7 +1,7 @@ DESCRIPTION > - `project_insights_copy_ds` contains materialized project insights data. - Populated by `project_insights_copy.pipe` copy pipe. - - Includes project metadata, health score, first commit, and activity metrics for last 365 days and previous 365 days. + - Includes project metadata, Health Score v2, first commit, and activity metrics for last 365 days and previous 365 days. - `id` column is the primary key identifier for the project or repository. - `type` column indicates the record type: 'project' for project insights or 'repo' for repository insights. - `repoUrl` column is the full repository URL for repo type records (empty string for project type). @@ -17,11 +17,6 @@ DESCRIPTION > - `organizationDependencyCount` column is the number of organizations making up 51% of contributions. - `organizationDependencyPercentage` column is the combined contribution percentage of dependent organizations. - `achievements` column is an array of tuples (leaderboardType, rank, totalCount) representing project achievements. - - `healthScore` column is the overall health score for the project (0-100). - - `contributorHealthScore` column is the health score percentage for the contributors category (0-100). - - `popularityHealthScore` column is the health score percentage for the popularity category (0-100). - - `developmentHealthScore` column is the health score percentage for the development category (0-100). - - `securityHealthScore` column is the health score percentage for the security category (0-100). - `firstCommit` column is the timestamp of the first commit in the project. - `starsLast365Days` column is the count of stars in the last 365 days. - `forksLast365Days` column is the count of forks in the last 365 days. @@ -32,7 +27,7 @@ DESCRIPTION > - `activeContributorsPrevious365Days` column is the unique count of active contributors in the previous 365 days (365-730 days ago). - `activeOrganizationsPrevious365Days` column is the unique count of active organizations in the previous 365 days (365-730 days ago). - `status` column is the current status of the project (e.g., 'active', 'archived'). - - `healthScoreV2` column is the Akrites-methodology composite health score (0-100). For project records (`type='project'`): sum of the three per-category medians (maintainerHealthScoreV2 + securitySupplyChainScoreV2 + developmentActivityScoreV2), null-guarded per IN-1248 (null when fewer than 2 categories are present). For repo records (`type='repo'`): per-repo score passed through from `health_score_v2_repo_copy_ds`. Distinct from the legacy `healthScore` column (community/contributor-based). + - `healthScoreV2` column is the Akrites-methodology composite health score (0-100). For project records (`type='project'`): sum of the three per-category medians (maintainerHealthScoreV2 + securitySupplyChainScoreV2 + developmentActivityScoreV2), null-guarded per IN-1248 (null when fewer than 2 categories are present). For repo records (`type='repo'`): per-repo score passed through from `health_score_v2_repo_copy_ds`. - `healthLabel` column buckets `healthScoreV2`: 'excellent' (85+), 'healthy' (70-84), 'fair' (50-69), 'concerning' (30-49), 'critical' (<30). Lowercase, matches `ossPackages_enriched_ds.healthLabel` convention. - `lifecycleLabel` column is the project's aggregated maintenance state across its packages, using best-state-wins precedence (active > stable > declining > abandoned > archived) over `ossPackages_enriched_ds.lifecycleLabel`. - `impactScore` column is the average Osprey criticality `impact` (0-100) across the project's packages. Null when the project has no linked package data. @@ -62,11 +57,6 @@ SCHEMA > `organizationDependencyCount` UInt64, `organizationDependencyPercentage` Float64, `achievements` Array(Tuple(String, UInt64, UInt64)), - `healthScore` Nullable(Float64), - `contributorHealthScore` Nullable(Float64), - `popularityHealthScore` Nullable(Float64), - `developmentHealthScore` Nullable(Float64), - `securityHealthScore` Nullable(Float64), `firstCommit` Nullable(DateTime64(3)), `starsLast365Days` UInt64, `forksLast365Days` UInt64, diff --git a/services/libs/tinybird/pipes/categories_oss_index.pipe b/services/libs/tinybird/pipes/categories_oss_index.pipe index 7f17a42f32..ba7dca96a5 100644 --- a/services/libs/tinybird/pipes/categories_oss_index.pipe +++ b/services/libs/tinybird/pipes/categories_oss_index.pipe @@ -34,9 +34,25 @@ DESCRIPTION > Returns only needed columns from insights projects SQL > - SELECT id, name, logoUrl, description, healthScore + SELECT + id, + name, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore FROM insights_projects_populated_ds - GROUP BY id, name, logoUrl, description, healthScore + GROUP BY + id, + name, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore NODE categories_oss_index_collections_deduplicated DESCRIPTION > @@ -80,7 +96,10 @@ SQL > pd.name AS projectName, pd.logoUrl AS projectLogo, pd.description AS description, - pd.healthScore AS healthScore + pd.healthScoreV2 AS healthScoreV2, + pd.healthLabel AS healthLabel, + pd.healthScoreV2Normalized AS healthScoreV2Normalized, + pd.healthMaxScore AS healthMaxScore FROM categories_oss_index_projects_ranked_by_category topProjects JOIN categories_oss_index_projects_deduplicated pd ON pd.id = topProjects.projectId WHERE topProjects.rn <= 5 @@ -159,8 +178,11 @@ SQL > projectLogo, softwareValue, avgScore, - healthScore, - description + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore ) ) AS topProjects FROM categories_oss_index_projects diff --git a/services/libs/tinybird/pipes/category_groups_oss_index.pipe b/services/libs/tinybird/pipes/category_groups_oss_index.pipe index 136fcb00f5..6c0b938951 100644 --- a/services/libs/tinybird/pipes/category_groups_oss_index.pipe +++ b/services/libs/tinybird/pipes/category_groups_oss_index.pipe @@ -31,9 +31,27 @@ DESCRIPTION > Returns only columns which we need from insights projects table SQL > - SELECT id, name, logoUrl, description, healthScore, status + SELECT + id, + name, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore, + status FROM insights_projects_populated_ds - GROUP BY id, name, logoUrl, description, healthScore, status + GROUP BY + id, + name, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore, + status NODE category_groups_oss_index_collections_deduplicated DESCRIPTION > @@ -77,7 +95,10 @@ SQL > pd.name AS projectName, pd.logoUrl AS projectLogo, pd.description AS description, - pd.healthScore AS healthScore, + pd.healthScoreV2 AS healthScoreV2, + pd.healthLabel AS healthLabel, + pd.healthScoreV2Normalized AS healthScoreV2Normalized, + pd.healthMaxScore AS healthMaxScore, pd.status as status FROM category_groups_oss_index_projects_ranked_by_category_group topProjects JOIN category_groups_oss_index_projects_deduplicated pd ON pd.id = topProjects.projectId @@ -161,9 +182,12 @@ SQL > projectLogo, softwareValue, avgScore, - healthScore, description, - status + status, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore ) ) AS topProjects FROM category_groups_oss_index_projects diff --git a/services/libs/tinybird/pipes/collection_insights_aggregate_projects_copy_pipe.pipe b/services/libs/tinybird/pipes/collection_insights_aggregate_projects_copy_pipe.pipe index d6cdfa2981..3d44c726cb 100644 --- a/services/libs/tinybird/pipes/collection_insights_aggregate_projects_copy_pipe.pipe +++ b/services/libs/tinybird/pipes/collection_insights_aggregate_projects_copy_pipe.pipe @@ -12,8 +12,7 @@ NODE collection_insights_aggregate_projects_aggregated DESCRIPTION > Aggregates project counts and health scores per collection from insights_projects_populated_ds. Uses same "onboarded" definition as original logic: projects with organizationCount > 0 OR contributorCount > 0. - Averages healthScoreV2 (not legacy healthScore) to agree with the "Unavailable" state - shown elsewhere, which also gates on healthScoreV2 IS NULL (IN-1257). + Averages healthScoreV2, matching the "Unavailable" state's healthScoreV2 IS NULL gate (IN-1257). Normalizes each project's score to a /100 scale before averaging (healthScoreV2 * 100 / healthMaxScore) so a partial score (e.g. 45/60) contributes its equivalent full-scale value (75) rather than being averaged in as a raw, disadvantaged 45 (IN-1262, per product decision). diff --git a/services/libs/tinybird/pipes/collections_oss_index.pipe b/services/libs/tinybird/pipes/collections_oss_index.pipe index dfa5daf052..76975c3a3f 100644 --- a/services/libs/tinybird/pipes/collections_oss_index.pipe +++ b/services/libs/tinybird/pipes/collections_oss_index.pipe @@ -38,9 +38,29 @@ DESCRIPTION > Returns only needed columns from insights projects SQL > - SELECT id, name, slug, logoUrl, description, healthScore, status + SELECT + id, + name, + slug, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore, + status FROM insights_projects_populated_ds - GROUP BY id, name, slug, logoUrl, description, healthScore, status + GROUP BY + id, + name, + slug, + logoUrl, + description, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore, + status NODE collections_oss_index_projects_ranked_by_collection DESCRIPTION > @@ -76,7 +96,10 @@ SQL > pd.slug AS projectSlug, pd.logoUrl AS projectLogo, pd.description, - pd.healthScore, + pd.healthScoreV2, + pd.healthLabel, + pd.healthScoreV2Normalized, + pd.healthMaxScore, pd.status FROM collections_oss_index_projects_ranked_by_collection topProjects JOIN collections_oss_index_projects_deduplicated pd ON pd.id = topProjects.projectId @@ -109,10 +132,13 @@ SQL > projectLogo, softwareValue, avgScore, - healthScore, description, projectSlug, - status + status, + healthScoreV2, + healthLabel, + healthScoreV2Normalized, + healthMaxScore ) ) AS topProjects FROM collections_oss_index_projects diff --git a/services/libs/tinybird/pipes/health_score_contributions_outside_work_hours.pipe b/services/libs/tinybird/pipes/health_score_contributions_outside_work_hours.pipe deleted file mode 100644 index 59dab07e3a..0000000000 --- a/services/libs/tinybird/pipes/health_score_contributions_outside_work_hours.pipe +++ /dev/null @@ -1,53 +0,0 @@ -NODE health_score_contributions_outside_work_hours_score -SQL > - % - SELECT - segmentId, - round( - (100. * countIf((weekday >= 6) OR (two_hours_block >= 18) OR (two_hours_block < 8))) - / count(id) - ) AS contributionsOutsideWorkHours - FROM contributions_with_local_time_ds AS a - WHERE - 1 = 1 - {% if defined(project) %} - AND segmentId = (SELECT segmentId FROM segments_filtered) - AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded) - {% if defined(repos) %} AND channel IN (SELECT channel FROM repos_to_channels) {% end %} - {% if defined(startDate) %} - AND timestamp - > {{ DateTime(startDate, description="Filter after date", required=False) }} - {% end %} - {% if defined(endDate) %} - AND timestamp - < {{ DateTime(endDate, description="Filter before date", required=False) }} - {% end %} - {% else %} - AND timestamp >= toStartOfDay(now() - toIntervalDay(365)) - AND timestamp < toStartOfDay(now() + toIntervalDay(1)) - AND channel NOT IN (SELECT channel FROM repos_to_channels_excluded) - {% end %} - GROUP BY segmentId - -NODE health_score_contributions_outside_work_hours_benchmark -SQL > - % - SELECT - segmentId, - contributionsOutsideWorkHours, - CASE - WHEN contributionsOutsideWorkHours >= 75 - THEN 0 - WHEN contributionsOutsideWorkHours BETWEEN 50 AND 74 - THEN 1 - WHEN contributionsOutsideWorkHours BETWEEN 40 AND 49 - THEN 2 - WHEN contributionsOutsideWorkHours BETWEEN 30 AND 39 - THEN 3 - WHEN contributionsOutsideWorkHours BETWEEN 20 AND 29 - THEN 4 - WHEN contributionsOutsideWorkHours BETWEEN 0 AND 19 - THEN 5 - ELSE 0 - END AS contributionsOutsideWorkHoursBenchmark - FROM health_score_contributions_outside_work_hours_score diff --git a/services/libs/tinybird/pipes/health_score_copy.pipe b/services/libs/tinybird/pipes/health_score_copy.pipe deleted file mode 100644 index 095b10cb4c..0000000000 --- a/services/libs/tinybird/pipes/health_score_copy.pipe +++ /dev/null @@ -1,172 +0,0 @@ -NODE health_score_copy_project_repo_deduplicated -DESCRIPTION > - Returns necessary columns for projects - -SQL > - SELECT id, segmentId, slug, widgets - from insightsProjects FINAL - WHERE isNull (deletedAt) AND enabled = 1 AND segmentId != '' - -NODE health_score_copy_data -SQL > - SELECT - health_score_copy_project_repo_deduplicated.id as id, - health_score_copy_project_repo_deduplicated.segmentId as segmentId, - health_score_copy_project_repo_deduplicated.slug as slug, - health_score_copy_project_repo_deduplicated.widgets as widgets, - health_score_active_contributors.activeContributors as activeContributors, - health_score_active_contributors.activeContributorsBenchmark as activeContributorsBenchmark, - health_score_contributor_dependency.contributorDependencyCount as contributorDependencyCount, - health_score_contributor_dependency.contributorDependencyPercentage - as contributorDependencyPercentage, - health_score_contributor_dependency.contributorDependencyBenchmark - as contributorDependencyBenchmark, - health_score_organization_dependency.organizationDependencyCount as organizationDependencyCount, - health_score_organization_dependency.organizationDependencyPercentage - as organizationDependencyPercentage, - health_score_organization_dependency.organizationDependencyBenchmark - as organizationDependencyBenchmark, - health_score_retention.retentionRate as retentionRate, - health_score_retention.retentionBenchmark as retentionBenchmark, - health_score_stars.stars as stars, - health_score_stars.starsBenchmark as starsBenchmark, - health_score_forks.forks as forks, - health_score_forks.forksBenchmark as forksBenchmark, - health_score_issues_resolution.issueResolution as issueResolution, - health_score_issues_resolution.issueResolutionBenchmark as issueResolutionBenchmark, - health_score_pull_requests.pullRequests as pullRequests, - health_score_pull_requests.pullRequestsBenchmark as pullRequestsBenchmark, - health_score_merge_lead_time.mergeLeadTime as mergeLeadTime, - health_score_merge_lead_time.mergeLeadTimeBenchmark as mergeLeadTimeBenchmark, - health_score_active_days.activeDaysCount as activeDaysCount, - health_score_active_days.activeDaysBenchmark as activeDaysBenchmark, - health_score_contributions_outside_work_hours.contributionsOutsideWorkHours - as contributionsOutsideWorkHours, - health_score_contributions_outside_work_hours.contributionsOutsideWorkHoursBenchmark - as contributionsOutsideWorkHoursBenchmark, - health_score_search_volume.searchVolumeAverage as searchVolumeAverage, - health_score_search_volume.searchVolumeBenchmark as searchVolumeBenchmark, - health_score_security.securityCategoryPercentage as securityCategoryPercentage, - health_score_security.securityPercentage as securityPercentage - FROM health_score_copy_project_repo_deduplicated - LEFT JOIN - health_score_active_contributors - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_active_contributors.segmentId - LEFT JOIN - health_score_contributor_dependency - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_contributor_dependency.segmentId - LEFT JOIN - health_score_organization_dependency - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_organization_dependency.segmentId - LEFT JOIN - health_score_retention - ON health_score_copy_project_repo_deduplicated.segmentId = health_score_retention.segmentId - LEFT JOIN - health_score_stars - ON health_score_copy_project_repo_deduplicated.segmentId = health_score_stars.segmentId - LEFT JOIN - health_score_forks - ON health_score_copy_project_repo_deduplicated.segmentId = health_score_forks.segmentId - LEFT JOIN - health_score_issues_resolution - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_issues_resolution.segmentId - LEFT JOIN - health_score_pull_requests - ON health_score_copy_project_repo_deduplicated.segmentId = health_score_pull_requests.segmentId - LEFT JOIN - health_score_merge_lead_time - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_merge_lead_time.segmentId - LEFT JOIN - health_score_active_days - ON health_score_copy_project_repo_deduplicated.segmentId = health_score_active_days.segmentId - LEFT JOIN - health_score_contributions_outside_work_hours - ON health_score_copy_project_repo_deduplicated.segmentId - = health_score_contributions_outside_work_hours.segmentId - LEFT JOIN - health_score_search_volume - ON health_score_copy_project_repo_deduplicated.id = health_score_search_volume.id - LEFT JOIN - health_score_security - ON health_score_copy_project_repo_deduplicated.id = health_score_security.id - -NODE health_score_copy_result -SQL > - WITH - arrayFilter( - x -> x >= 0, - [ - CASE - WHEN has(widgets, 'activeContributors') THEN activeContributorsBenchmark ELSE -1 - END, - CASE - WHEN has(widgets, 'contributorDependency') - THEN contributorDependencyBenchmark - ELSE -1 - END, - CASE - WHEN has(widgets, 'organizationDependency') - THEN organizationDependencyBenchmark - ELSE -1 - END, - CASE WHEN has(widgets, 'retention') THEN retentionBenchmark ELSE -1 END - ] - ) AS contributorBenchmarks, - arrayFilter( - x -> x >= 0, - [ - CASE WHEN has(widgets, 'stars') THEN starsBenchmark ELSE -1 END, - CASE WHEN has(widgets, 'forks') THEN forksBenchmark ELSE -1 END, - CASE - WHEN (has(widgets, 'searchQueries') AND searchVolumeAverage > 0) - THEN searchVolumeBenchmark - ELSE -1 - END - ] - ) AS popularityBenchmarks, - arrayFilter( - x -> x >= 0, - [ - CASE WHEN has(widgets, 'issuesResolution') THEN issueResolutionBenchmark ELSE -1 END, - CASE WHEN has(widgets, 'pullRequests') THEN pullRequestsBenchmark ELSE -1 END, - CASE WHEN has(widgets, 'mergeLeadTime') THEN mergeLeadTimeBenchmark ELSE -1 END, - CASE WHEN has(widgets, 'activeDays') THEN activeDaysBenchmark ELSE -1 END, - CASE - WHEN has(widgets, 'contributionsOutsideWorkHours') - THEN contributionsOutsideWorkHoursBenchmark - ELSE -1 - END - ] - ) AS developmentBenchmarks - SELECT - *, - round( - 100.0 - * arraySum(contributorBenchmarks) - / if(length(contributorBenchmarks) = 0, 1, 5 * length(contributorBenchmarks)) - ) AS contributorPercentage, - round( - 100.0 - * arraySum(popularityBenchmarks) - / if(length(popularityBenchmarks) = 0, 1, 5 * length(popularityBenchmarks)) - ) AS popularityPercentage, - round( - 100.0 - * arraySum(developmentBenchmarks) - / if(length(developmentBenchmarks) = 0, 1, 5 * length(developmentBenchmarks)) - ) AS developmentPercentage, - round( - (contributorPercentage + popularityPercentage + developmentPercentage + securityPercentage) - / 4 - ) AS overallScore - FROM health_score_copy_data - -TYPE COPY -TARGET_DATASOURCE health_score_copy_ds -COPY_MODE replace -COPY_SCHEDULE 50 0 * * * diff --git a/services/libs/tinybird/pipes/health_score_overview.pipe b/services/libs/tinybird/pipes/health_score_overview.pipe deleted file mode 100644 index 410964f46d..0000000000 --- a/services/libs/tinybird/pipes/health_score_overview.pipe +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION > - - `health_score_overview.pipe` serves the health score overview widget providing comprehensive project health metrics. - - **When `slugs` parameter is provided, returns health scores for multiple specified projects** for comparison analysis. - - **When `slugs` parameter is NOT provided, returns health score for current project** via `segments_filtered` context. - - Uses pre-calculated health score data from `health_score_copy_ds` datasource for optimized performance. - - Primary use case: displaying project health dashboards and comparative health analysis across projects. - - Parameters: - - `project`: Optional string for project slug (e.g., 'k8s', 'tensorflow') - inherited from `segments_filtered` when `slugs` not provided - - `slugs`: Optional array of project slugs for multi-project health comparison (e.g., ['k8s', 'tensorflow']) - - Response: All health score fields from `health_score_copy_ds` including overall scores and component metrics - -NODE health_score_overview_result -SQL > - % - SELECT * - FROM health_score_copy_ds - WHERE - 1 = 1 - {% if defined(slugs) %} - AND slug - IN {{ Array(slugs, 'String', description="Filter by project slug list", required=False) }} - {% else %} AND id = (SELECT insightsProjectId FROM segments_filtered) - {% end %} diff --git a/services/libs/tinybird/pipes/health_score_security.pipe b/services/libs/tinybird/pipes/health_score_security.pipe deleted file mode 100644 index 469bbb27c2..0000000000 --- a/services/libs/tinybird/pipes/health_score_security.pipe +++ /dev/null @@ -1,62 +0,0 @@ -NODE health_score_security_project_repos -SQL > - % - SELECT i.id, r.url AS repo, i.slug - FROM insightsProjects i FINAL - JOIN repositories r FINAL ON r.insightsProjectId = i.id - WHERE - isNull (i.deletedAt) - AND i.enabled = 1 - AND isNull (r.deletedAt) - AND r.enabled = true - AND r.excluded = false - {% if defined(project) %} - AND i.id = (SELECT insightsProjectId FROM segments_filtered) - AND r.url in (select arrayJoin(repositories) from segments_filtered) - {% if defined(repos) %} - AND r.url - IN {{ Array(repos, 'String', description="Filter activity repo list", required=False) }} - {% end %} - {% end %} - -NODE health_score_security_check_pass_rate -SQL > - SELECT - id, - security_deduplicated_merged_ds.repo AS repo, - category, - controlId, - insightsProjectSlug, - arrayFilter( - -- Hiding specific checks from evaluation - x -> x['requirementId'] not in ('OSPS-AC-01.01'), assessments - ) as filteredAssessments, - length(arrayFilter(x -> x['result'] = 'Failed', filteredAssessments)) AS failedAssessments, - length(arrayFilter(x -> x['result'] = 'Passed', filteredAssessments)) AS passedAssessments - FROM security_deduplicated_merged_ds - JOIN - health_score_security_project_repos - ON security_deduplicated_merged_ds.repo = health_score_security_project_repos.repo - WHERE category not in ('Documentation', 'Vulnerability Management') AND insightsProjectSlug = slug - -NODE health_score_security_category_pass_rate -SQL > - SELECT - id, - category, - sum(failedAssessments) as failed, - sum(passedAssessments) as passed, - sum(failedAssessments + passedAssessments) as total, - round(100 * (passed / total)) as percentage - FROM health_score_security_check_pass_rate - WHERE id != '' - GROUP BY id, category - -NODE health_score_security_score -SQL > - SELECT - id, - groupArray((category, percentage)) AS securityCategoryPercentage, - round(avg(percentage)) as securityPercentage - FROM health_score_security_category_pass_rate - GROUP BY id diff --git a/services/libs/tinybird/pipes/insightsProjects_filtered.pipe b/services/libs/tinybird/pipes/insightsProjects_filtered.pipe index e8395c8873..cb8a27ebe2 100644 --- a/services/libs/tinybird/pipes/insightsProjects_filtered.pipe +++ b/services/libs/tinybird/pipes/insightsProjects_filtered.pipe @@ -29,7 +29,10 @@ SQL > insights_projects_populated_ds.firstCommit, insights_projects_populated_ds.firstCommitUrl, insights_projects_populated_ds.repoData, - insights_projects_populated_ds.healthScore, + insights_projects_populated_ds.healthScoreV2, + insights_projects_populated_ds.healthLabel, + insights_projects_populated_ds.healthScoreV2Normalized, + insights_projects_populated_ds.healthMaxScore, insights_projects_populated_ds.communityPlatforms, insights_projects_populated_ds.communityKeywords, insights_projects_populated_ds.communityLanguages, diff --git a/services/libs/tinybird/pipes/insights_projects_populated_copy.pipe b/services/libs/tinybird/pipes/insights_projects_populated_copy.pipe index d874ab6efe..0513edff28 100644 --- a/services/libs/tinybird/pipes/insights_projects_populated_copy.pipe +++ b/services/libs/tinybird/pipes/insights_projects_populated_copy.pipe @@ -116,9 +116,19 @@ SQL > organizationCount as "organizationCount" FROM segments_aggregates_with_ids_datasource -NODE insights_projects_populated_copy_health_score_deduplicated +NODE insights_projects_populated_copy_health_v2 +DESCRIPTION > + Health Score v2 per project from project_insights_copy_ds, plus the score normalized to a 0-100 scale + SQL > - SELECT id, overallScore as healthScore FROM health_score_copy_ds + SELECT + id, + healthScoreV2, + healthLabel, + if(healthMaxScore > 0, healthScoreV2 * 100.0 / healthMaxScore, NULL) AS healthScoreV2Normalized, + healthMaxScore + FROM project_insights_copy_ds + WHERE type = 'project' NODE archived_excluded_repositories DESCRIPTION > @@ -236,7 +246,6 @@ SQL > any (insights_projects_populated_copy_aggregates.softwareValue) as softwareValue, any (insights_projects_populated_copy_aggregates.contributorCount) as contributorCount, any (insights_projects_populated_copy_aggregates.organizationCount) as organizationCount, - any (insights_projects_populated_copy_health_score_deduplicated.healthScore) as healthScore, any (archived_excluded_repositories.archivedRepositories) as archivedRepositories, any (archived_excluded_repositories.excludedRepositories) as excludedRepositories, any (insights_projects_populated_copy_mentions.communityPlatforms) as communityPlatforms, @@ -244,7 +253,13 @@ SQL > any (insights_projects_populated_copy_mentions.communityLanguages) as communityLanguages, any (segments.status) as status, any (segments.maturity) as maturity, - any (last_vulnerability_scan_status.lastVulnerabilityScanStatus) as lastVulnerabilityScanStatus + any (last_vulnerability_scan_status.lastVulnerabilityScanStatus) as lastVulnerabilityScanStatus, + any (insights_projects_populated_copy_health_v2.healthScoreV2) as healthScoreV2, + any (insights_projects_populated_copy_health_v2.healthLabel) as healthLabel, + any ( + insights_projects_populated_copy_health_v2.healthScoreV2Normalized + ) as healthScoreV2Normalized, + any (insights_projects_populated_copy_health_v2.healthMaxScore) as healthMaxScore FROM insightsProjects FINAL LEFT JOIN insights_projects_populated_copy_collections_slugs @@ -261,9 +276,6 @@ SQL > LEFT JOIN insights_projects_populated_copy_aggregates ON insights_projects_populated_copy_aggregates.projectId = insightsProjects.id - LEFT JOIN - insights_projects_populated_copy_health_score_deduplicated - ON insights_projects_populated_copy_health_score_deduplicated.id = insightsProjects.id LEFT JOIN archived_excluded_repositories ON archived_excluded_repositories.insightsProjectId = insightsProjects.id @@ -274,6 +286,9 @@ SQL > last_vulnerability_scan_status ON last_vulnerability_scan_status.insightsProjectId = insightsProjects.id LEFT JOIN segments ON segments.id = insightsProjects.segmentId + LEFT JOIN + insights_projects_populated_copy_health_v2 + ON insights_projects_populated_copy_health_v2.id = insightsProjects.id WHERE isNull (insightsProjects.deletedAt) AND insightsProjects.enabled = 1 group by 1 diff --git a/services/libs/tinybird/pipes/project_insights.pipe b/services/libs/tinybird/pipes/project_insights.pipe index b3011b2881..bac242569f 100644 --- a/services/libs/tinybird/pipes/project_insights.pipe +++ b/services/libs/tinybird/pipes/project_insights.pipe @@ -1,6 +1,6 @@ DESCRIPTION > - `project_insights.pipe` serves project insights data for a specific project. - - Returns comprehensive metrics including project metadata (name, logoUrl, isLF), health score with category breakdowns (contributors, popularity, development, security), contributor count, software value, contributor and organization dependency metrics, leaderboard achievements, and activity metrics for both current and previous 365-day periods. + - Returns comprehensive metrics including project metadata (name, logoUrl, isLF), Health Score v2, contributor count, software value, contributor and organization dependency metrics, leaderboard achievements, and activity metrics for both current and previous 365-day periods. - Parameters: - `slug`: Optional string for a single project slug (e.g., 'kubernetes') - `slugs`: Optional array of project slugs for multi-project query (e.g., ['kubernetes', 'tensorflow']) @@ -12,7 +12,7 @@ DESCRIPTION > - `pageSize`: Optional integer for result limit, defaults to 10 - `page`: Optional integer for pagination offset calculation, defaults to 0 - Response: Project records with all insights metrics including achievements as array of (leaderboardType, rank, totalCount) tuples - - `healthScoreV2`, `healthLabel`, `lifecycleLabel`, `impactScore`, `impactLabel` are the Akrites-methodology fields (see `project_insights_copy_ds` for band definitions); may be null when the project has no linked package data. `healthScoreV2` is distinct from the legacy `healthScore` field. + - `healthScoreV2`, `healthLabel`, `lifecycleLabel`, `impactScore`, `impactLabel` are the Akrites-methodology fields (see `project_insights_copy_ds` for band definitions); may be null when the project has no linked package data. - `maintainerHealthScoreV2` (0-40), `securitySupplyChainScoreV2` (0-35), `developmentActivityScoreV2` (0-25) are the project-level rollup of the Health Score v2 category breakdown (IN-1212) — independent medians (`quantileExact(0.5)`) over the project's enabled, non-excluded repos. For project records, `healthScoreV2` is their sum (null-guarded per IN-1248). Null when no repo in the project has a value for that category. - `coveredCategoryCount` (0-3) and `healthMaxScore` (60/65/75/100, IN-1262) describe a partial Health Score v2: `healthMaxScore` is the capped denominator when exactly one category is missing (2 of 3 covered), 100 when all 3 are covered, and null when fewer than 2 are covered (same guard as `healthScoreV2`). @@ -36,11 +36,6 @@ SQL > organizationDependencyCount, organizationDependencyPercentage, achievements, - healthScore, - contributorHealthScore, - popularityHealthScore, - developmentHealthScore, - securityHealthScore, firstCommit, starsLast365Days, forksLast365Days, diff --git a/services/libs/tinybird/pipes/project_insights_copy.pipe b/services/libs/tinybird/pipes/project_insights_copy.pipe index 02c2cec57c..a6abc8a3fc 100644 --- a/services/libs/tinybird/pipes/project_insights_copy.pipe +++ b/services/libs/tinybird/pipes/project_insights_copy.pipe @@ -3,7 +3,7 @@ TOKEN "claude_readonly" READ NODE project_insights_copy_base_projects DESCRIPTION > - Returns base project information (id, name, slug, segmentId, logoUrl, isLF, contributorCount, organizationCount, softwareValue, healthScore, firstCommit) + Returns base project information (id, name, slug, segmentId, logoUrl, isLF, contributorCount, organizationCount, softwareValue, firstCommit) SQL > SELECT @@ -18,7 +18,6 @@ SQL > contributorCount, organizationCount, softwareValue, - healthScore, firstCommit FROM insights_projects_populated_ds GROUP BY @@ -33,25 +32,24 @@ SQL > contributorCount, organizationCount, softwareValue, - healthScore, firstCommit -NODE project_insights_copy_dependency_metrics +NODE project_insights_copy_contributor_dependency DESCRIPTION > - Get contributor and organization dependency metrics from health_score_copy_ds + Contributor dependency, last 365 days; segmentId aliased to avoid the USING (segmentId) clash + +SQL > + SELECT segmentId AS dependencySegmentId, contributorDependencyCount, contributorDependencyPercentage + FROM health_score_contributor_dependency + +NODE project_insights_copy_organization_dependency +DESCRIPTION > + Organization dependency, last 365 days; segmentId aliased to avoid the USING (segmentId) clash SQL > SELECT - slug, - contributorDependencyCount, - contributorDependencyPercentage, - organizationDependencyCount, - organizationDependencyPercentage, - contributorPercentage, - popularityPercentage, - developmentPercentage, - securityPercentage - FROM health_score_copy_ds + segmentId AS dependencySegmentId, organizationDependencyCount, organizationDependencyPercentage + FROM health_score_organization_dependency NODE project_insights_copy_achievements DESCRIPTION > @@ -281,16 +279,11 @@ SQL > base.contributorCount AS contributorCount, base.organizationCount AS organizationCount, base.softwareValue AS softwareValue, - COALESCE(dep.contributorDependencyCount, 0) AS contributorDependencyCount, - COALESCE(dep.contributorDependencyPercentage, 0) AS contributorDependencyPercentage, - COALESCE(dep.organizationDependencyCount, 0) AS organizationDependencyCount, - COALESCE(dep.organizationDependencyPercentage, 0) AS organizationDependencyPercentage, + COALESCE(cdep.contributorDependencyCount, 0) AS contributorDependencyCount, + COALESCE(cdep.contributorDependencyPercentage, 0) AS contributorDependencyPercentage, + COALESCE(odep.organizationDependencyCount, 0) AS organizationDependencyCount, + COALESCE(odep.organizationDependencyPercentage, 0) AS organizationDependencyPercentage, COALESCE(ach.achievements, []) AS achievements, - base.healthScore AS healthScore, - dep.contributorPercentage AS contributorHealthScore, - dep.popularityPercentage AS popularityHealthScore, - dep.developmentPercentage AS developmentHealthScore, - dep.securityPercentage AS securityHealthScore, base.firstCommit AS firstCommit, COALESCE(pm.starsLast365Days, 0) + COALESCE(sd.starsLast365DaysSnapshot, 0) AS starsLast365Days, pm.forksLast365Days AS forksLast365Days, @@ -348,7 +341,12 @@ SQL > if(base.slug = 'korg' OR isArchived, NULL, hv2.coveredCategoryCount) AS coveredCategoryCount, if(base.slug = 'korg' OR isArchived, NULL, hv2.healthMaxScore) AS healthMaxScore FROM project_insights_copy_base_projects AS base - LEFT JOIN project_insights_copy_dependency_metrics AS dep ON base.slug = dep.slug + LEFT JOIN + project_insights_copy_contributor_dependency AS cdep + ON base.segmentId = cdep.dependencySegmentId + LEFT JOIN + project_insights_copy_organization_dependency AS odep + ON base.segmentId = odep.dependencySegmentId LEFT JOIN project_insights_copy_achievements AS ach ON base.slug = ach.slug LEFT JOIN project_insights_copy_period_metrics AS pm USING (segmentId) LEFT JOIN project_insights_copy_star_deltas AS sd ON base.segmentId = sd.segmentId @@ -409,6 +407,22 @@ SQL > WHERE timestamp >= now() - INTERVAL 730 DAY AND timestamp <= now() GROUP BY channel +NODE project_insights_copy_repo_contributor_dependency +DESCRIPTION > + Repository contributor dependency, last 365 days + +SQL > + SELECT channel, contributorDependencyCount, contributorDependencyPercentage + FROM repo_health_score_contributor_dependency + +NODE project_insights_copy_repo_organization_dependency +DESCRIPTION > + Repository organization dependency, last 365 days + +SQL > + SELECT channel, organizationDependencyCount, organizationDependencyPercentage + FROM repo_health_score_organization_dependency + NODE project_insights_copy_repo_results DESCRIPTION > Join all repository insights together @@ -426,16 +440,11 @@ SQL > base.contributorCount AS contributorCount, base.organizationCount AS organizationCount, base.softwareValue AS softwareValue, - COALESCE(hs.contributorDependencyCount, 0) AS contributorDependencyCount, - COALESCE(hs.contributorDependencyPercentage, 0) AS contributorDependencyPercentage, - COALESCE(hs.organizationDependencyCount, 0) AS organizationDependencyCount, - COALESCE(hs.organizationDependencyPercentage, 0) AS organizationDependencyPercentage, + COALESCE(cdep.contributorDependencyCount, 0) AS contributorDependencyCount, + COALESCE(cdep.contributorDependencyPercentage, 0) AS contributorDependencyPercentage, + COALESCE(odep.organizationDependencyCount, 0) AS organizationDependencyCount, + COALESCE(odep.organizationDependencyPercentage, 0) AS organizationDependencyPercentage, CAST([] AS Array(Tuple(String, UInt64, UInt64))) AS achievements, - hs.overallScore AS healthScore, - hs.contributorPercentage AS contributorHealthScore, - hs.popularityPercentage AS popularityHealthScore, - hs.developmentPercentage AS developmentHealthScore, - hs.securityPercentage AS securityHealthScore, base.firstCommit AS firstCommit, COALESCE(rm.starsLast365Days, 0) + COALESCE(srd.starsLast365DaysSnapshot, 0) AS starsLast365Days, @@ -480,21 +489,37 @@ SQL > CAST(NULL AS Nullable(UInt8)) AS coveredCategoryCount, CAST(NULL AS Nullable(UInt8)) AS healthMaxScore FROM project_insights_copy_repo_base AS base - LEFT JOIN repo_health_score_copy_ds AS hs ON base.repoUrl = hs.channel + LEFT JOIN project_insights_copy_repo_contributor_dependency AS cdep ON base.repoUrl = cdep.channel + LEFT JOIN project_insights_copy_repo_organization_dependency AS odep ON base.repoUrl = odep.channel LEFT JOIN project_insights_copy_repo_period_metrics AS rm ON base.repoUrl = rm.channel LEFT JOIN project_insights_copy_repo_star_deltas AS srd ON base.repoUrl = srd.repoUrl LEFT JOIN health_score_v2_repo_copy_ds AS hv2 ON base.repoUrl = hv2.repoUrl NODE project_insights_copy_results DESCRIPTION > - Union of project and repository insights + Union of project and repo insights; throws if a row type's dependency metrics are all zero SQL > - SELECT * - FROM project_insights_copy_project_results - UNION ALL - SELECT * - FROM project_insights_copy_repo_results + SELECT * EXCEPT (dependencyGuard) + FROM + ( + SELECT + *, + throwIf( + sum(contributorDependencyCount) OVER (PARTITION BY type) = 0 + OR sum(organizationDependencyCount) OVER (PARTITION BY type) = 0, + 'project_insights_copy: dependency metrics are all zero for a row type, check the health_score_*_dependency sources' + ) AS dependencyGuard + FROM + ( + SELECT * + FROM project_insights_copy_project_results + UNION ALL + SELECT * + FROM project_insights_copy_repo_results + ) + ) + WHERE dependencyGuard = 0 TYPE COPY TARGET_DATASOURCE project_insights_copy_ds diff --git a/services/libs/tinybird/pipes/project_repo_insights.pipe b/services/libs/tinybird/pipes/project_repo_insights.pipe index 1386e058b6..52767c752d 100644 --- a/services/libs/tinybird/pipes/project_repo_insights.pipe +++ b/services/libs/tinybird/pipes/project_repo_insights.pipe @@ -11,7 +11,7 @@ DESCRIPTION > - `pageSize`: Optional integer for result limit, defaults to 10 - `page`: Optional integer for pagination offset calculation, defaults to 0 - Response: Project and repository records with insights metrics - - `healthScoreV2`, `healthLabel`, `lifecycleLabel`, `impactScore`, `impactLabel` are the Akrites-methodology fields (see `project_insights_copy_ds` for band definitions); may be null when the record has no linked package data. `healthScoreV2` is distinct from the legacy `healthScore` field. + - `healthScoreV2`, `healthLabel`, `lifecycleLabel`, `impactScore`, `impactLabel` are the Akrites-methodology fields (see `project_insights_copy_ds` for band definitions); may be null when the record has no linked package data. - `maintainerHealthScoreV2` (0-40), `securitySupplyChainScoreV2` (0-35), `developmentActivityScoreV2` (0-25) are the Health Score v2 category breakdown (IN-1212). For project records: independent medians (`quantileExact(0.5)`) over the project's enabled, non-excluded repos; `healthScoreV2` is their sum (null-guarded per IN-1248). For repo records: per-repo values passed through from `health_score_v2_repo_copy_ds`; they sum to `healthScoreV2` only when all three categories are available; missing categories are imputed at the population median rate (IN-1249). Null when the record has no value for that category. - `coveredCategoryCount` (0-3) and `healthMaxScore` (60/65/75/100, IN-1262) describe a partial Health Score v2: `healthMaxScore` is the capped denominator when exactly one category is missing (2 of 3 covered), 100 when all 3 are covered, and null when fewer than 2 are covered (same guard as `healthScoreV2`). Project records only — always null for repo records, so a null here on a repo does not indicate missing project data. @@ -37,11 +37,6 @@ SQL > organizationDependencyCount, organizationDependencyPercentage, achievements, - healthScore, - contributorHealthScore, - popularityHealthScore, - developmentHealthScore, - securityHealthScore, firstCommit, starsLast365Days, forksLast365Days, diff --git a/services/libs/tinybird/pipes/projects_list.pipe b/services/libs/tinybird/pipes/projects_list.pipe index 9e6ad9712a..e0db59dc02 100644 --- a/services/libs/tinybird/pipes/projects_list.pipe +++ b/services/libs/tinybird/pipes/projects_list.pipe @@ -7,7 +7,7 @@ DESCRIPTION > - Parameters: - `search`: Optional string for searching projects (inherited from `insightsProjects_filtered`) - `count`: Optional boolean, when true returns project count instead of project data - - `orderByField`: Optional string specifying sort field, defaults to 'name'. Available fields: 'id', 'name', 'slug', 'description', 'logo', 'repositories', 'isLF', 'widgets', 'keywords', 'website', 'github', 'linkedin', 'twitter', 'score', 'rank', 'softwareValue', 'organizationCount', 'contributorCount', 'connectedPlatforms', 'firstCommit', 'repoData', 'healthScore' + - `orderByField`: Optional string specifying sort field, defaults to 'name'. Available fields: 'id', 'name', 'slug', 'description', 'logo', 'repositories', 'isLF', 'widgets', 'keywords', 'website', 'github', 'linkedin', 'twitter', 'score', 'rank', 'softwareValue', 'organizationCount', 'contributorCount', 'connectedPlatforms', 'firstCommit', 'repoData', 'healthScoreV2', 'healthLabel', 'healthScoreV2Normalized', 'healthMaxScore' - `orderByDirection`: Optional string ('asc' or 'desc'), defaults to 'asc' - `pageSize`: Optional integer for result limit, defaults to 10 - `page`: Optional integer for pagination offset calculation, defaults to 0