fix(api): correct champion history and deduplicate stats builds

Apply participant and champion filters before pagination and exclude timeline payloads. Route result statistics through the durable outbox, reuse current fragments, and serialize projection effects without spending retries on contention.

Validated with 716 API tests, 32 isolated Redis integration tests, API typecheck and build, and lint on changed files.
This commit is contained in:
dahyeon committed 2026-11-09 18:40:51 +09:00
1 parent ef141a13d0
commit f2eec479d9
14 files changed
+704 -47

No files matched your search

@@ -59,6 +59,24 @@ export class MatchStatsService {
return;
}
// Outbox redelivery (including older events observing the latest revision)
// must not reload Riot payloads or replace an already enriched fragment.
// Explicit rebuilds and timeline hydration still run at the same revision.
if (
options.sourceRevision !== undefined &&
!options.includeTimeline &&
competitionSource &&
(await this.repository.hasCurrentCompetitionFragment({
matchId,
sourceCompetitionId: competitionSource.sourceCompetitionId,
sourceRevision: competitionSource.sourceRevision,
projectorVersion: competitionSource.projectorVersion,
builderVersion: MATCH_STATS_BUILDER_VERSION,
}))
) {
return;
}
const riotIds = competitionSource?.riotMatchIds ?? [
...new Set(
(match.result?.games ?? [])