Skip to content

chore: remove transitional health score v1 compatibility - #2376

Closed
gaspergrom wants to merge 4 commits into
chore/IN-1222-remove-health-v1-apifrom
chore/IN-1222-remove-health-v1-transitional
Closed

gaspergrom wants to merge 4 commits into
chore/IN-1222-remove-health-v1-apifrom
chore/IN-1222-remove-health-v1-transitional

Conversation

@gaspergrom

@gaspergrom gaspergrom commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Do not merge until Joana Maia confirms consumer sign-off (LFX One, Org Lens, OD, Self Serve, CNCF) and a deprecation date, and crowd.dev PR 3 (#4922) is deployed.

Summary

  • chore: remove health score v1 fields and routes #2375 keeps compatibility code for the window when Tinybird still returns the v1 health score columns. crowd.dev PR 3 (chore: remove v1 health score computation and columns from Tinybird (IN-1222) crowd.dev#4922) drops those columns. Once it deploys, that code has nothing left to handle, and this PR removes it.
  • GET /api/project/{slug}/insights, GET /api/collection/{slug}/projects and GET /api/collection/{slug}/project-repos read the Tinybird rows directly. The shared legacyScoreFields filter stripped contributorHealthScore, popularityHealthScore, developmentHealthScore and securityHealthScore; the pipes stop selecting them, so the filter and the list in health-score.helpers.ts go. healthScore stays the raw healthScoreV2.
  • The Open Source Index handlers keep reading each tuple from the end. Only the comments about the v1 slot go.
  • Tests drop the v1 mocks from the insights, single-project, list and collection route tests, and the "with the v1 health slot" tuple layout. The v2 and null assertions stay.
  • With #4922 live, API responses stay the same. If this PR deploys first, the insights route and both collection routes return the four v1 sub-scores again, so it waits on that deploy.

Changes

File What changed
frontend/server/api/project/[slug]/insights.get.ts Drops the legacyScoreFields import and filter; returns the Tinybird row with healthScore set to healthScoreV2
frontend/server/api/project/[slug]/insights.get.test.ts Drops the v1 healthScore and sub-score mocks and the assertions that the handler strips them
frontend/server/api/project/[slug]/index.test.ts Drops the v1 healthScore mock
frontend/server/api/project/index.test.ts Drops the v1 healthScore mock
frontend/server/helpers/health-score.helpers.ts Removes the legacyScoreFields export
frontend/server/api/collection/[slug]/projects.ts Drops the v1 sub-score filter
frontend/server/api/collection/[slug]/project-repos.ts Drops the v1 sub-score filter
frontend/server/api/collection/[slug]/project-routes.test.ts Drops the v1 healthScore and sub-score mocks and the tests that the routes strip them
frontend/server/api/ossindex/ossindex.test.ts Runs the tuple tests on the layout without the v1 slot only
frontend/server/api/ossindex/categories.ts Comment only: drops the v1 slot note
frontend/server/api/ossindex/collections.ts Comment only: drops the v1 slot note
frontend/server/api/ossindex/groups.ts Comment only: drops the v1 slot note

JIRA

IN-1222: Deprecate v1 health score sinks and tables

Related PRs

Deploy order

  1. feat: show health score v2 in the open source index #2374, then chore: remove health score v1 fields and routes #2375. Retarget this PR to main once chore: remove health score v1 fields and routes #2375 merges.
  2. crowd.dev #4922 in production.
  3. This PR.

DB migrations

No DB migrations.

Test plan

  • Gates on this branch: pnpm lint, pnpm format:check, cd frontend && pnpm tsc-check && pnpm vitest run (366 tests). api/ has no changes.

To check after this PR deploys, with #4922 live:

  • GET /api/project/k8s/insights has none of the four v1 sub-scores, and healthScore equals healthScoreV2.
  • Open Source Index pills on projects, collections, categories and groups still match the API.

Checklist

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Required upstream PR #4922 remains open and undeployed, so the documented deployment gate is not yet satisfied.

0 open findings

What changed in this PR

Removes transitional Health Score v1 compatibility after the corresponding Tinybird schema cleanup.

Changes:

  • Returns Tinybird insight rows directly while preserving the v2 healthScore mapping.
  • Removes v1 fixture data and legacy tuple-layout tests.
  • Deletes obsolete compatibility comments.
File Description
frontend/​server/​api/​project/​[slug]/​insights.get.ts Removes legacy field filtering.
frontend/​server/​api/​project/​[slug]/​insights.get.test.ts Removes v1 response fixtures and assertions.
frontend/​server/​api/​project/​[slug]/​index.test.ts Removes the v1 score fixture.
frontend/​server/​api/​ossindex/​ossindex.test.ts Tests only the post-v1 tuple layout.
frontend/​server/​api/​ossindex/​categories.ts Removes an obsolete compatibility comment.
frontend/​server/​api/​ossindex/​collections.ts Removes an obsolete compatibility comment.
frontend/​server/​api/​ossindex/​groups.ts Removes an obsolete compatibility comment.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Required upstream PR #4922 remains open and draft, while consumer sign-off is still unconfirmed.

0 open findings

🧠 Review effort: Balanced

@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-health-v1-api branch from d347c1e to 1f8e782 Compare October 13, 2026 09:18
Copilot AI balanced review requested due to automatic review settings October 13, 2026 09:19
@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-health-v1-transitional branch from f5c76e8 to f96bd4a Compare October 13, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Upstream PR #4922 remains open and draft, while required consumer sign-off is still unconfirmed.

0 open findings

🧠 Review effort: Balanced

@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-health-v1-transitional branch from f96bd4a to 07119c8 Compare October 13, 2026 10:29
Copilot AI balanced review requested due to automatic review settings October 13, 2026 10:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Required consumer sign-off remains unconfirmed, and upstream crowd.dev PR #4922 is still open and undeployed.

0 open findings

🧠 Review effort: Balanced

@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-health-v1-transitional branch from 07119c8 to db2993b Compare October 13, 2026 10:35
Copilot AI balanced review requested due to automatic review settings October 13, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Required consumer sign-off remains unconfirmed, while upstream PR #4922 is still open, draft, and undeployed.

0 open findings

🧠 Review effort: Balanced

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
… test IN-1222

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
…n routes IN-1222

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom

Copy link
Copy Markdown
Collaborator Author

Closing for now: org-dashboard still reads the v1 health score (/api/project?healthScore=true) and will keep running until it is retired, expected early November 2026. Reopen and rebase this once org-dashboard is shut down. The branch is kept.

@gaspergrom gaspergrom closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants