From 69671be6092ddb38720d10c62962bfc4a670e974 Mon Sep 17 00:00:00 2001 From: soul Date: Tue, 1 Dec 2026 00:40:58 +0100 Subject: [PATCH] Inventory grid parity: the atlas bound sits at sqrt(4 x 66) = 16 after the alpha mutant; the overlay capture exits 1 on any exception Co-Authored-By: Claude Sonnet 5.5 --- .../Editor/InventoryGridOverlayCapture.cs | 20 +++++++++++++++++++ .../Editor/InventoryGridParityCapture.cs | 9 +++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Editor/InventoryGridOverlayCapture.cs b/Assets/Scripts/Editor/InventoryGridOverlayCapture.cs index ce295fa7d..49896a63f 100644 --- a/Assets/Scripts/Editor/InventoryGridOverlayCapture.cs +++ b/Assets/Scripts/Editor/InventoryGridOverlayCapture.cs @@ -43,7 +43,27 @@ public static class InventoryGridOverlayCapture private sealed class Runner : MonoBehaviour { + // An exception inside a coroutine would leave the session running, so any failure exits 1. private IEnumerator Start() + { + var inner = Capture(); + while (true) + { + try + { + if (!inner.MoveNext()) yield break; + } + catch (Exception exception) + { + Debug.LogException(exception); + EditorApplication.Exit(1); + yield break; + } + yield return inner.Current; + } + } + + private IEnumerator Capture() { var failed = false; var png = SessionState.GetString(PngKey, ""); diff --git a/Assets/Scripts/Editor/InventoryGridParityCapture.cs b/Assets/Scripts/Editor/InventoryGridParityCapture.cs index d55bdb581..b27398471 100644 --- a/Assets/Scripts/Editor/InventoryGridParityCapture.cs +++ b/Assets/Scripts/Editor/InventoryGridParityCapture.cs @@ -22,10 +22,11 @@ public static class InventoryGridParityCapture private const string PrefabPath = "Assets/Prefabs/UI/Inventory.prefab"; private const string ShaderPath = "Assets/Shaders/InventoryGrid.shader"; - // The bound on the largest 8-bit channel difference of any pixel of the atlas and of the real hull, outside the footprints of the - // oracle's own slips. lodur:ruling:deterministic-bound-margin: the geometric mean of the shipped worst reading (4) and the least - // claimed mutant's reading (122, fill-inset-2.5), sqrt(4 x 122) = 22.1, a separation of 5.5 on each side. The other mutants read 170 to 255. - private static int AtlasBound = 22; + // The bound on the largest 8-bit channel difference of any pixel of the atlas, the real hull, vertex alpha and RectMask2D, outside the + // footprints of the oracle's own slips. lodur:ruling:deterministic-bound-margin: the geometric mean of the shipped worst reading (4) and the + // least claimed mutant's reading (66, alpha-multiply-dropped), sqrt(4 x 66) = 16.2, a separation of about 4 on each side. The other + // mutants read 122 to 255. + private static int AtlasBound = 16; // The bound on a thermal mask's rms difference, 0..1 channel units, in the atlas and in every cell of the real hull's thermal state: the // geometric mean of the shipped worst reading (0.0980, the hull's menu-size cells at 1920, which sit at half-pixel offsets the sprites blur // across) and the pipe-width-minus mutant's (0.1474), a separation of 1.22 on each side.