Skip to content

Support multiple integrations of the same type per game - #1048

Merged
tudddorrr merged 1 commit into
developfrom
multiple-integrations-of-the-same-type
Sep 5, 2026
Merged

Support multiple integrations of the same type per game#1048
tudddorrr merged 1 commit into
developfrom
multiple-integrations-of-the-same-type

Conversation

@tudddorrr

@tudddorrr tudddorrr commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Entity model

  • SteamworksLeaderboardMapping composite primary key now includes integration_id, so the same Talo leaderboard can map to different Steamworks leaderboards across integrations.
  • SteamworksLeaderboardEntry FK and unique constraint widened to include integration_id.
  • SteamworksPlayerStat gains an integration FK with a unique constraint on (integration_id, player_stat_id) replacing the old player_stat_id unique.
  • Two migrations backfill integration_id from the game's existing Steamworks integration, then enforce NOT NULL.

Duplicate detection

  • Creating or updating an integration now checks whether another integration of the same type already points at the same external app identity (appId, clientId, or bundleId).
  • Different apps of the same type are allowed; same app is rejected with a descriptive error.

Player resolution

  • PlayerAlias.resolveIdentifier loads all integrations of the matching type (newest first) and tries each until one succeeds, so a ticket valid against one app is accepted even when other integrations exist.
  • Integration.getPlayerIdentifier now returns a uniform { identifier, initialPlayerProps } shape instead of a union of per-service result types.

Integration triggering

  • triggerIntegrations runs integrations sequentially instead of Promise.all and catches per-integration errors, so one failing integration no longer blocks the rest.

Cleanup tasks

  • cleanupSteamworksLeaderboardEntries and cleanupSteamworksPlayerStats populate and follow the direct integration relation instead of resolving it through game lookups, simplifying the logic and removing orphan-handling fallbacks.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.43%. Comparing base (93ffea9) to head (704cd42).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1048      +/-   ##
===========================================
+ Coverage    98.42%   98.43%   +0.01%     
===========================================
  Files          477      477              
  Lines         7613     7618       +5     
  Branches       999      996       -3     
===========================================
+ Hits          7493     7499       +6     
  Misses          49       49              
+ Partials        71       70       -1     

☔ View full report in Codecov by Harness.
📢 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 multiple-integrations-of-the-same-type branch from 64761fd to 704cd42 Compare September 5, 2026 12:17
@tudddorrr
tudddorrr merged commit d473a34 into develop Sep 5, 2026
9 checks passed
@tudddorrr
tudddorrr deleted the multiple-integrations-of-the-same-type branch September 5, 2026 12:20
@tudddorrr tudddorrr added the enhancement New feature or request label Sep 5, 2026
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