Skip to content

Commit 8efef1b

Browse files
committed
docs(tinybird): update stale Layer 2 descriptions to median imputation (IN-1249)
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
1 parent dcf11a3 commit 8efef1b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

services/libs/tinybird/datasources/health_score_v2_repo_copy_ds.datasource

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ DESCRIPTION >
2121
- `impactScore` (0-100) — MAX(packages.impact) * 100 over packages published by this repo. NULL when
2222
the repo has no linked packages.
2323
- Graceful degradation (spec Layer 1+2): per-category pipes emit NULL when covered sub-signal weight
24-
is <40% of that category's max pts (Layer 1); the aggregate health_score_v2 applies Layer 2 rescaling
25-
(`SUM(available categories) * (100 / SUM(available category weights))`) so only actually-available
26-
scores are summed. If all three categories are unavailable, healthScoreV2 itself is NULL (see
24+
is <40% of that category's max pts (Layer 1); the aggregate health_score_v2 imputes each missing
25+
category at the population median rate for that category (`missing_max × median(score/max)` over
26+
measured repos — IN-1249, 2026-08-28) rather than redistributing the missing weight across measured
27+
categories. If all three categories are unavailable, healthScoreV2 itself is NULL (see
2728
health_score_v2.pipe DESCRIPTION for the full spec).
2829
- Known temporary gap: security-practices score's spec-stated max is 8 points (includes +1 for
2930
`security_contact_email IS NOT NULL` flag), but no `security_contact_email` column exists yet in

services/libs/tinybird/pipes/project_insights_copy.pipe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ DESCRIPTION >
113113
repo in the project," since max-of-maxes = max-over-all.
114114
- maintainerHealthScoreV2 / securitySupplyChainScoreV2 / developmentActivityScoreV2 (IN-1212): same
115115
exact-median rollup as healthScoreV2, over the same repo set — kept consistent since healthScoreV2
116-
is itself defined as the sum of these three categories at repo level (see
117-
health_score_v2_repo_copy_ds). `quantileExact(0.5)` (not quantile/median, which uses reservoir
116+
is itself the sum of measured category scores plus population-median imputation for missing categories
117+
at repo level (IN-1249; see health_score_v2_repo_copy_ds). `quantileExact(0.5)` (not quantile/median, which uses reservoir
118118
sampling) already returns NULL, not 0/NaN, when every repo is NULL for a category (confirmed live);
119119
deterministic output required to reproduce v1↔v2 divergence analysis and acceptance-criteria targets.
120120

services/libs/tinybird/pipes/project_repo_insights.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DESCRIPTION >
1212
- `page`: Optional integer for pagination offset calculation, defaults to 0
1313
- Response: Project and repository records with insights metrics
1414
- `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.
15-
- `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 — they do not necessarily sum to `healthScoreV2`. 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 (partial coverage rescales). Null when the record has no value for that category.
15+
- `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 — they do not necessarily sum to `healthScoreV2`. 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.
1616

1717
TAGS "Insights, Widget", "Project", "Repository"
1818

0 commit comments

Comments
 (0)