review(bp): drop fragile cast, thread CT, internalize cache reset

- IndexResponse.BattlePassLevelInfo widened to IReadOnlyDictionary<string,BattlePassLevel>?
  so any IReadOnlyDictionary impl (FrozenDictionary, wrapper, etc.) serializes correctly
  instead of silently null-ing via a failed as-cast
- LoadController.Index now takes CancellationToken ct and threads it to GetLevelCurveAsync
  instead of CancellationToken.None
- BattlePassRepository.ResetLevelCurveCache changed from public to internal; added
  InternalsVisibleTo("SVSim.UnitTests") to SVSim.Database.csproj (was absent)
This commit is contained in:
gamer147
2026-05-26 23:01:26 -04:00
parent 9bec1df52f
commit 7abdfe27cb
4 changed files with 8 additions and 5 deletions

View File

@@ -243,7 +243,7 @@ public class IndexResponse
/// </summary>
[JsonPropertyName("battle_pass_level_info")]
[Key("battle_pass_level_info")]
public Dictionary<string, BattlePassLevel>? BattlePassLevelInfo { get; set; }
public IReadOnlyDictionary<string, BattlePassLevel>? BattlePassLevelInfo { get; set; }
/// <summary>
/// Wire is string[]; parser calls .ToString() on each element (LoadDetail.cs:493-499).