Skip to content

feat: project insights (IN-1009)#3903

Merged
gaspergrom merged 1 commit intomainfrom
feat/project-analytics
Mar 11, 2026
Merged

feat: project insights (IN-1009)#3903
gaspergrom merged 1 commit intomainfrom
feat/project-analytics

Conversation

@gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Mar 10, 2026

Note

Medium Risk
Medium risk because it changes the project_insights_copy_ds schema and copy pipeline joins, which can impact downstream queries and increase copy-job cost if the new joins/aggregations behave unexpectedly.

Overview
Expands the project insights dataset and API output. project_insights_copy_ds and project_insights.pipe now include additional project metadata (logoUrl, isLF, contributor/org counts), contributor/org dependency metrics, and achievements (latest leaderboard snapshot aggregated per project).

Updates query behavior and ingestion. project_insights.pipe adds optional multi-project filtering via slugs and ids (and makes slug optional), while project_insights_copy.pipe enriches the daily COPY by left-joining dependency metrics from health_score_copy_ds and aggregating achievements from leaderboards_copy_ds, defaulting missing values via COALESCE.

Written by Cursor Bugbot for commit ea522e4. This will update automatically on new commits. Configure here.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom gaspergrom requested a review from emlimlf March 10, 2026 08:15
@gaspergrom gaspergrom self-assigned this Mar 10, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

{% end %}
{% if defined(ids) %}
AND id
IN {{ Array(ids, 'String', description="Filter by project id list", required=False) }}
Copy link

Choose a reason for hiding this comment

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

Endpoint returns all data when no parameters provided

Medium Severity

The slug parameter changed from required=True to required=False, and the new slugs/ids parameters are also optional. When none are provided, the WHERE 1=1 clause causes the endpoint to return the entire project_insights_copy_ds table unfiltered. The documentation states "At least one of slug, slugs, or ids should be provided" but this constraint isn't enforced. Other similar endpoints like health_score_overview.pipe use an {% else %} fallback to guarantee a filter is always applied.

Fix in Cursor Fix in Web

@gaspergrom gaspergrom merged commit 82c57ac into main Mar 11, 2026
18 checks passed
@gaspergrom gaspergrom deleted the feat/project-analytics branch March 11, 2026 09:01
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