feat: Gamification MCP 'my progress' read tools - EXO-88399#1985
feat: Gamification MCP 'my progress' read tools - EXO-88399#1985bmestrallet wants to merge 2 commits into
Conversation
4d5446d to
3c68bf7
Compare
fa50b49 to
69b9b44
Compare
Review: Gamification MCP 'my progress' read tools (stacked on #1984)OverviewAdds 6 read-only tools to 🟠 Medium —
|
|
@boubaker — fixed (commit 4d53d5a): |
Add 6 read-only campaign-progress tools to GamificationMcpTool, stacked on the existing gamification MCP tools: - list_campaign_badges: badges (levels) of a campaign + score needed - get_my_campaigns: campaigns the user is a member of or owns - list_joinable_campaigns: open public campaigns to join - get_my_points_total: total points earned in a date range / campaign - get_my_score_breakdown: points per campaign for a period - check_quest_availability: pre-check for announce_quest with a reason All tools are hard-scoped to the current user (self identity id / username resolved via the existing helpers; no arbitrary identity accepted). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… review) - EXO-88399 get_my_campaigns applied limit/offset to the member-program and owned-program id lists INDEPENDENTLY and then unioned them, so it could return up to 2x limit items and offset paging over the union was unsound. Fetch the full member and owned id sets (offset 0, unbounded limit -1), union and dedup them, sort deterministically (ascending id), then apply offset/limit ONCE over the sorted union. Add a regression test asserting exactly `limit` items, no duplicates and correct offset paging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4d53d5a to
3cee060
Compare
|



What
Follow-up batch of 6 read-only "my progress" tools on
GamificationMcpTool, extending the campaigns/quests set. Campaign vocabulary; all reads, hard-scoped to the caller (no arbitrary identity param). Stacked on #1984.list_campaign_badges(campaign_id)BadgeService.findEnabledBadgesByProgramId(view-gated)get_my_campaigns(limit, offset)ProgramService.getMemberProgramIds+getOwnedProgramIdslist_joinable_campaigns(limit, offset)ProgramService.getPublicProgramIdsget_my_points_total(from_date, to_date, campaign_id?)RealizationService.getScoreByIdentityIdAndBetweenDatesget_my_score_breakdown(period)RealizationService.getLeaderboardStatsByIdentityIdcheck_quest_availability(quest_id)getRealizationValidityContext+hasPendingRealizationlist_my_realizations(already shipped) remains the per-event history; these add badges, my/joinable campaigns, windowed totals, breakdown, and the announce pre-check.Tests & verification
mvn clean install -pl services -Pcoverage→ BUILD SUCCESS, 354 tests, coverage gate 0.75 held;-parametersconfirmed (MethodParameters 46).AI contribution. Stacked on
feat/gamification-mcp-tools(#1984).