Skip to content

Google Play Games integration, cleanup events task#883

Merged
tudddorrr merged 2 commits intodevelopfrom
google-play-games-integration
Mar 15, 2026
Merged

Google Play Games integration, cleanup events task#883
tudddorrr merged 2 commits intodevelopfrom
google-play-games-integration

Conversation

@tudddorrr
Copy link
Collaborator

No description provided.

@tudddorrr tudddorrr added the enhancement New feature or request label Mar 6, 2026
@tudddorrr tudddorrr force-pushed the google-play-games-integration branch from 185d1ef to 9961cfd Compare March 6, 2026 22:56
@claude
Copy link

claude bot commented Mar 6, 2026

PR Review: Google Play Games Integration

Overall this is a solid integration with good test coverage. A few issues to address:


Critical: success property missing from makeRequest return type

In googlePlayGamesClient.test.ts, two tests destructure success from client.makeRequest(), but the implementation only returns { res, event }. These tests will fail because success is undefined, not false:

const { res, event, success } = await client.makeRequest({ ... })
expect(success).toBe(false)  // undefined !== false -- test fails

Fix: either add success: res === null to the return value in makeRequest, or update the tests to assert res === null directly.


Major: Steam-specific sync routes do not guard against GPG integrations

sync-leaderboards.ts and sync-stats.ts call integration.getSteamConfig() on whatever integration is loaded from the route param, with no type check. If a user passes a GPG integration ID, getSteamConfig() casts to SteamIntegrationConfig and returns undefined for syncLeaderboards, resulting in a misleading 400 "Leaderboard syncing is not enabled" error instead of a meaningful type mismatch response.

A guard at the top of each handler would fix this:

if (integration.type !== IntegrationType.STEAMWORKS) {
  return ctx.throw(400, 'This action is not supported for this integration type')
}

Minor: Config schema accepts fields from both integration types

The create and update routes mix all config fields (apiKey, appId, syncLeaderboards, syncStats, clientId, clientSecret) in one schema with no cross-type validation. A Steamworks integration can silently receive clientId/clientSecret without error. The runtime switch handles it correctly, but schema-level validation would catch client-side bugs earlier.


Test Coverage

No issues -- the identify flow, error paths, client retry logic, and cleanup task are all well covered.


@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 95.52239% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.26%. Comparing base (7534f86) to head (8ea07a7).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...ons/google-play-games/google-play-games-players.ts 85.18% 4 Missing ⚠️
src/entities/player-alias.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #883      +/-   ##
===========================================
- Coverage    97.34%   97.26%   -0.08%     
===========================================
  Files          398      402       +4     
  Lines         6325     6441     +116     
  Branches       819      837      +18     
===========================================
+ Hits          6157     6265     +108     
- Misses          85       91       +6     
- Partials        83       85       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tudddorrr tudddorrr force-pushed the google-play-games-integration branch 2 times, most recently from 9b8a8af to c60df73 Compare March 7, 2026 15:25
@tudddorrr tudddorrr force-pushed the google-play-games-integration branch from b142c1c to a3925fd Compare March 12, 2026 19:20
@tudddorrr tudddorrr force-pushed the google-play-games-integration branch 5 times, most recently from bc36bba to c358873 Compare March 14, 2026 22:32
@tudddorrr tudddorrr force-pushed the google-play-games-integration branch from c358873 to 8ea07a7 Compare March 14, 2026 22:33
@TaloDev TaloDev deleted a comment from claude bot Mar 14, 2026
@TaloDev TaloDev deleted a comment from claude bot Mar 14, 2026
@tudddorrr tudddorrr merged commit a3214cf into develop Mar 15, 2026
8 of 10 checks passed
@tudddorrr tudddorrr deleted the google-play-games-integration branch March 15, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant