From abc178e332d1cbc476ee2b5cb832cee018879cd0 Mon Sep 17 00:00:00 2001 From: Joana Maia Date: Fri, 10 Jul 2026 14:36:08 +0100 Subject: [PATCH 1/3] fix: align org page critical projects scoring with spec (IN-1174) - narrow activity/contributor counts to code-only types (drop isCollaboration) - widen activity window from 365 to 730 days (24 months) - raise maintainers score from 3.0 to 10.0 to match dbt model Co-Authored-By: Claude Opus 4.7 Signed-off-by: Joana Maia --- services/libs/tinybird/pipes/org_page_projects.pipe | 2 +- .../libs/tinybird/pipes/org_page_projects_copy_pipe.pipe | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/services/libs/tinybird/pipes/org_page_projects.pipe b/services/libs/tinybird/pipes/org_page_projects.pipe index 61cfd2fa00..72994c47e6 100644 --- a/services/libs/tinybird/pipes/org_page_projects.pipe +++ b/services/libs/tinybird/pipes/org_page_projects.pipe @@ -1,5 +1,5 @@ DESCRIPTION > - Returns the list of projects an organization contributed to in the last 365 days, + Returns the list of projects an organization contributed to in the last 730 days (24 months), read from the precomputed org_page_projects_copy_ds. TAGS "Organization page" diff --git a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe index 36035b0f61..6747cfed53 100644 --- a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe +++ b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe @@ -1,6 +1,7 @@ DESCRIPTION > Nightly copy pipe that precomputes per-org per-project metrics for the org page. Writes one row per (organizationId, segmentId) into org_page_projects_copy_ds. + Activity and contributor counts use code-only activity types over the last 730 days (24 months). TAGS "Organization page" @@ -9,11 +10,11 @@ DESCRIPTION > Collaboration and code contribution activity types (mirrors leaderboards filter) SQL > - SELECT activityType, platform FROM activityTypes FINAL WHERE isCollaboration OR isCodeContribution + SELECT activityType, platform FROM activityTypes FINAL WHERE isCodeContribution NODE org_page_projects_org_segment_activity DESCRIPTION > - Collaboration/code activity and contributor counts per org per project segment in the last 365 days + Code-only activity and contributor counts per org per project segment in the last 730 days (24 months) SQL > SELECT @@ -25,7 +26,7 @@ SQL > AND ar.platform = at.platform WHERE ar.organizationId != '' - AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(365)) + AND ar.timestamp >= toStartOfDay(now() - toIntervalDay(730)) AND ar.timestamp < toStartOfDay(now() + toIntervalDay(1)) GROUP BY ar.organizationId, ar.segmentId @@ -138,7 +139,7 @@ SQL > ( -- Maintainers: 3 pts if org has at least 1 active maintainer (24-month window) -- Contributors: 0 if no share; 1.1 if share in (0, 0.1%]; share + 1.0 otherwise - CASE WHEN ifNull(mt.scoreMaintainersCount, 0) >= 1 THEN 3.0 ELSE 0.0 END + CASE + CASE WHEN ifNull(mt.scoreMaintainersCount, 0) >= 1 THEN 10.0 ELSE 0.0 END + CASE WHEN ifNull(pa.scoreContributorCount, 0) = 0 OR ifNull(oa.scoreOrgContributorCount, 0) = 0 From 17b29f93e6f5f3ecb195b635261e4c3007360fb2 Mon Sep 17 00:00:00 2001 From: Joana Maia Date: Mon, 13 Jul 2026 15:36:33 +0100 Subject: [PATCH 2/3] fix: description Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Joana Maia --- services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe index 6747cfed53..d94fdc4f86 100644 --- a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe +++ b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe @@ -7,7 +7,7 @@ TAGS "Organization page" NODE org_page_projects_contribution_activity_types DESCRIPTION > - Collaboration and code contribution activity types (mirrors leaderboards filter) + Code contribution activity types SQL > SELECT activityType, platform FROM activityTypes FINAL WHERE isCodeContribution From f4ebf3a2a9b668e927fad344a79b8ec1d7cb0929 Mon Sep 17 00:00:00 2001 From: Joana Maia Date: Mon, 13 Jul 2026 15:36:47 +0100 Subject: [PATCH 3/3] fix: description Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Joana Maia --- services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe index d94fdc4f86..df3a9ae313 100644 --- a/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe +++ b/services/libs/tinybird/pipes/org_page_projects_copy_pipe.pipe @@ -137,7 +137,7 @@ SQL > ifNull(m.prsOpened, 0) AS totalPrsOpened, ifNull(m.orgPrsOpened, 0) AS orgPrsOpened, ( - -- Maintainers: 3 pts if org has at least 1 active maintainer (24-month window) + -- Maintainers: 10 pts if org has at least 1 active maintainer (24-month window) -- Contributors: 0 if no share; 1.1 if share in (0, 0.1%]; share + 1.0 otherwise CASE WHEN ifNull(mt.scoreMaintainersCount, 0) >= 1 THEN 10.0 ELSE 0.0 END + CASE WHEN