Comment-only; behavior-preserving; 231 BattleNode tests green. - OutboundSequencer._archive: name the unbounded-per-match growth + ack-prune point. - NodeCrypto.BuildAes: SECURITY remarks on key-derived IV reuse + base64 entropy loss; warn against caching the session key. - MatchContext/BattlePlayer: FOOTGUN notes on reference-based record equality over the deck list. - RecordTokensFrom: TRUST note on isSelf/idx overwrite; name the idx>deckCount guard for untrusted peers (not added — trusted-LAN today). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
11 lines
746 B
C#
11 lines
746 B
C#
namespace SVSim.BattleNode.Bridge;
|
|
|
|
/// <summary>One player slot for a pending battle. Carries the viewer's identity and
|
|
/// the per-battle MatchContext snapshot built at do_matching time.
|
|
/// <para>FOOTGUN: this is a <c>record</c>, but <see cref="Context"/> transitively holds an
|
|
/// <c>IReadOnlyList<long></c> (the deck), so the synthesized value-equality is REFERENCE-based
|
|
/// on that list — two BattlePlayers with equal deck *contents* compare unequal. Don't use
|
|
/// BattlePlayer / <see cref="MatchContext"/> as dictionary keys or <c>Distinct()</c> / <c>HashSet</c>
|
|
/// operands without first giving them content equality. Not exercised today.</para></summary>
|
|
public sealed record BattlePlayer(long ViewerId, MatchContext Context);
|