From c27bf444a5c6934a8e038717384689fcb73e55fc Mon Sep 17 00:00:00 2001 From: gamer147 Date: Wed, 3 Jun 2026 09:06:26 -0400 Subject: [PATCH] refactor(auth): drop null-guard on dev steam ticket log; add test fixture doc ISteamServer contract forbids null tickets (prod impl and sole caller both assume non-null), so the dev bypass no longer needs the ?. / ?? 0 defensive form. Also adds a class-level XML doc summary to DevAlwaysValidSteamServerTests matching the style of other fixtures in the suite. Co-Authored-By: Claude Sonnet 4.6 --- SVSim.EmulatedEntrypoint/Services/DevAlwaysValidSteamServer.cs | 2 +- SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SVSim.EmulatedEntrypoint/Services/DevAlwaysValidSteamServer.cs b/SVSim.EmulatedEntrypoint/Services/DevAlwaysValidSteamServer.cs index 5b3ae5c..a3a30ca 100644 --- a/SVSim.EmulatedEntrypoint/Services/DevAlwaysValidSteamServer.cs +++ b/SVSim.EmulatedEntrypoint/Services/DevAlwaysValidSteamServer.cs @@ -21,7 +21,7 @@ public sealed class DevAlwaysValidSteamServer : ISteamServer { _logger.LogWarning( "DEV Steam bypass: accepting ticket for steamId {SteamId} WITHOUT validation (ticketLen={Len}).", - steamId, ticket?.Length ?? 0); + steamId, ticket.Length); return true; } diff --git a/SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs b/SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs index fea69f6..d6478b3 100644 --- a/SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs +++ b/SVSim.UnitTests/Services/DevAlwaysValidSteamServerTests.cs @@ -4,6 +4,7 @@ using SVSim.EmulatedEntrypoint.Services; namespace SVSim.UnitTests.Services; +/// Covers the always-accept contract and no-throw stubs of the Dev-only ISteamServer bypass. [TestFixture] public class DevAlwaysValidSteamServerTests {