From f3719d99432a9e8f7b13a120ed793a8e762aa7b7 Mon Sep 17 00:00:00 2001 From: soul Date: Mon, 19 Oct 2026 01:30:10 +0200 Subject: [PATCH] Boss refusal tests: compare the serialized ledger, not the pack (pack bytes differ between identical runs) Co-Authored-By: Claude Sonnet 5.5 --- tests/Aetheria.Shared.Tests/RunGoalTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RunGoalTests.cs b/tests/Aetheria.Shared.Tests/RunGoalTests.cs index 8a00db639..c618d712e 100644 --- a/tests/Aetheria.Shared.Tests/RunGoalTests.cs +++ b/tests/Aetheria.Shared.Tests/RunGoalTests.cs @@ -630,14 +630,14 @@ public sealed partial class RunStartTests Assert.Equal(expected.Random.NextFloat(), next); } - // Everything a generated zone exposes afterwards: the serialized pack, the ledger, the roster and the gear of its ships, and + // Everything a generated zone exposes afterwards: the serialized ledger, the roster and the gear of its ships, and // the next draw of the item stream. A faction's generator stream shows in the ships it outfitted, so it is in the pack. private string ZoneFacts(ItemManager items, ZonePack pack) { var options = CultDocumentMessagePackSerialization.OptionsFor(typeof(HullData).Assembly); - var bytes = Convert.ToHexString(System.Security.Cryptography.SHA256.HashData(MessagePack.MessagePackSerializer.Serialize(pack, options))); + var bytes = Convert.ToHexString(System.Security.Cryptography.SHA256.HashData(MessagePack.MessagePackSerializer.Serialize(items.Lots, options))); var gear = pack.Entities.Select(entity => $"{HullName(items, entity)}|{(entity.Faction.IsSet() ? entity.Faction.Key.ToString() : "-")}|{(EntitySerializer.Unpack(items, null, entity) is Ship ? string.Join(";", Cells(items, entity)) : "-")}"); - return $"pack {bytes} NextLot={items.Lots.NextLot} lots={items.Lots.Lots.Count}\n{string.Join("\n", gear)}\nnext item draw {items.Random.NextFloat():R}"; + return $"ledger {bytes} NextLot={items.Lots.NextLot} lots={items.Lots.Lots.Count}\n{string.Join("\n", gear)}\nnext item draw {items.Random.NextFloat():R}"; } // The boss of the named faction, whose Loadout is made unbuildable by unbuild, refuses before anything is minted or drawn: the