Skip to content

fix: list people issues without a project group - #5437

Merged
skwowet merged 1 commit into
mainfrom
fix/issue-482-member-issues-without-project-group
Nov 25, 2026
Merged

skwowet merged 1 commit into
mainfrom
fix/issue-482-member-issues-without-project-group

Conversation

@skwowet

@skwowet skwowet commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

GET /data-quality/member no longer needs a segment. With a project group or project, the seven people issue lists return the same results as before. Without one, they list people across all of them.

Without a segment, people are sorted by their activity count from membersGlobalActivityCount, which holds one row per member. memberSegmentsAgg has a row per hierarchy level, so it can't be summed. People with no activity aren't listed, same as with a segment today.

"Too many identities per platform" now checks each member's identities one at a time, most active first, and stops at the page limit. Before, it counted duplicates across all 15.8M verified username identities before sorting. Without a segment it timed out after 60 s, and the plan with a segment was the same.

On production, first page, with no segment and with the two largest project groups:

Issue type No segment LF OSS Index (~15M members) CNCF (~2M members)
Too many identities per platform 4 ms 291 ms 71 ms
Too many identities 769 ms 2.1 s 546 ms
Too many emails 704 ms 568 ms 8 ms
No work experience 64 ms 53 ms 131 ms
Work experience missing info 14 ms 14 ms 18 ms
Work experience missing period 18 ms 15 ms 18 ms
Conflicting work experience 117 ms 22 ms 17 ms

Closes linuxfoundation/lfx-cdp-insights-ops#482

@skwowet
skwowet requested review from a team and lfx-one as code owners November 24, 2026 23:41
@skwowet
skwowet requested review from epipav and a balanced review from Copilot November 24, 2026 23:41
@lfx-one

lfx-one commented Nov 24, 2026 •

Copy link
Copy Markdown

@skwowet I'm starting review 1 of this pull request now (started 2026-11-24 23:41 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hi Yeganathan S, thanks for the clear description and the production timings.

Summary

This pull request makes the segment optional on GET /data-quality/member. Without a segment, the seven people issue lists sort by membersGlobalActivityCount. The "too many identities per platform" query now checks each member's identities with a lateral join. The change is small and consistent, and I found no blocking problems.

Decision

✅ Approved

No findings.

Details

Overall impression: The change is focused on three files. A shared memberActivity helper picks the join and count column, so queries with a segment keep the same joins and ordering. The new getRequestedSegmentIds(req)[0] reads the segment from the query or the body, as the middleware does. An empty list gives undefined, which selects the global path. Permission checking (memberRead) is unchanged. The $(segmentId) parameter is only referenced in the segment branch, and segmentId is passed as a parameter in both cases, so there is no injection risk from the interpolated fragments. The interpolated fragments are constants.

Documentation reminder: changed GET /data-quality/member. Please check product pages and external docs; the author and maintainers own those updates.

Other reviewers and CI checks: No other reviewer comments yet. Required check DCO passed on a05ca6d.

Rule files: read AGENTS.md, .claude/rules/commit-workflow.md; skipped CONTRIBUTING.md (not read), .claude/rules/adr-format.md (not read), .claude/rules/skill-guidance.md (not read)

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · The code changes appear sound, but the updated JSDoc must follow the repository's comment policy before merging.RetriggerView in GreptileConfidence Score: 4/5

[High impact] The endpoint can now return member issue results across all project segments.

The code changes appear sound, but the updated JSDoc must follow the repository's comment policy before merging.

FindingsFix All in Claude CodeFindings

  1. P2 JSDoc repeats the code ▶
Fix with agent prompt
### Issue 1
backend/src/services/dataQualityService.ts:28
The updated JSDoc describes behavior already clear from the optional `segmentId` argument and `memberActivity`. `AGENTS.md` forbids obvious JSDoc and comments that explain what the code does. Remove these descriptions before merging. The changed descriptions in `services/libs/data-access-layer/src/data-quality/index.ts` follow the same pattern.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Allows /data-quality/member requests without a project group or project.

  • Member issue lists work with or without a project segment.
  • The per-platform identity list checks each member before it returns a page.

Reviews (2) · Last reviewed commit: "fix: list people issues without a projec..." · Reviewed by Greptile

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.

🟢 Approval recommended

No active review issues were identified in the changes enabling cross-project data-quality queries while preserving segment-scoped queries.

No open issues 🎉

What changed in this PR

This PR lets CDP’s people data-quality endpoint list issues across all projects when no segment is supplied, while preserving segment-scoped queries.

Changes:

  • Makes the segment optional through the API, service, and seven data-access queries.
  • Uses membersGlobalActivityCount to rank unscoped results without summing hierarchy-level counts.
  • Replaces the global duplicate-identity aggregation with per-member checks for “too many identities per platform.”
File Description
services/​libs/​data-access-layer/​src/​data-quality/​index.ts Adds optional segment handling, selects the appropriate activity-count source, and rewrites duplicate-platform identity checks.
backend/​src/​services/​dataQualityService.ts Makes the segment argument optional when fetching member issues.
backend/​src/​api/​dataQuality/​dataQualityMember.ts Removes the required-segment rejection and uses the shared segment-request helper.

Review effort: Balanced

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No blocking, security or privacy findings. With a segment the queries behave as before; without one they fall back to membersGlobalActivityCount.

Documentation

This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:

  • GET /data-quality/member (the segments query parameter is now optional; the 400 "Segment ID is required" response is removed)

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
@skwowet
skwowet force-pushed the fix/issue-482-member-issues-without-project-group branch from a05ca6d to b4f6897 Compare November 25, 2026 22:19
Copilot AI balanced review requested due to automatic review settings November 25, 2026 22:19
@skwowet
skwowet merged commit 6a868be into main Nov 25, 2026
13 checks passed
@skwowet
skwowet deleted the fix/issue-482-member-issues-without-project-group branch November 25, 2026 22:19
*
* @param {IDataQualityParams} params - The parameters for finding member issues, including the type of issue, limit, and offset.
* @param {string} segmentId - The ID of the segment where the members belong.
* @param {string} [segmentId] - The ID of the segment where the members belong. Searches all members when omitted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 JSDoc repeats the code

The updated JSDoc describes behavior already clear from the optional segmentId argument and memberActivity. AGENTS.md forbids obvious JSDoc and comments that explain what the code does. Remove these descriptions before merging. The changed descriptions in services/libs/data-access-layer/src/data-quality/index.ts follow the same pattern.

Context Used: AGENTS.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/src/services/dataQualityService.ts
Line: 28

Comment:
**JSDoc repeats the code**

The updated JSDoc describes behavior already clear from the optional `segmentId` argument and `memberActivity`. `AGENTS.md` forbids obvious JSDoc and comments that explain what the code does. Remove these descriptions before merging. The changed descriptions in `services/libs/data-access-layer/src/data-quality/index.ts` follow the same pattern.

**Context Used:** AGENTS.md ([source](https://github.com/linuxfoundation/crowd.dev/blob/main/AGENTS.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Cursor

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.

🟡 Changes recommended

The inner join on a daily-refreshed activity snapshot excludes newly active members from all seven unscoped lists until refresh, so eligibility must use live activity membership.

1 open issue

Review effort: Balanced

count: 'msa."activityCount"',
}
: {
join: `INNER JOIN "membersGlobalActivityCount" gac ON m.id = gac."memberId"`,
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.

4 participants