feat(load-index): emit data.card_master_hash on mismatch (tier-1 freshness gate)

This commit is contained in:
gamer147
2026-06-12 12:27:40 -04:00
parent 92a21e7a7a
commit b4a279ef0c
3 changed files with 111 additions and 2 deletions

View File

@@ -42,6 +42,23 @@ public class IndexResponse
[Key("deck_format")]
public Format DeckFormat { get; set; } = Format.Rotation;
/// <summary>
/// Freshness trigger for the card-master refresh flow (Wizard/CardMaster.cs:18-30).
/// Nullable + global <c>WhenWritingNull</c> means absence on the wire when the request
/// already matches <c>CardMasterConfig.CurrentHash</c>. Presence (any value) tells the
/// client to call <c>POST /immutable_data/card_master</c> with this echoed back; the
/// client treats the string as opaque.
/// <para>
/// Lives on the inner <c>data</c> payload, NOT <c>data_headers</c> — verified by
/// <c>LoadDetail.cs:414</c> constructing <c>new CardMaster.UpdateInfo(jsonData)</c>
/// from the inner data, and the 2026-06-03 capture at
/// <c>data_dumps/captures/traffic_prod_allstars_freepack.ndjson</c>.
/// </para>
/// </summary>
[JsonPropertyName("card_master_hash")]
[Key("card_master_hash")]
public string? CardMasterHash { get; set; }
#endregion
#region Basic User Data