{
  "environment": "Windows Unity 6000.6.7f1, real D3D11 device, light skin, isolated batch project. Real SettingsProvider inside the strict IMGUI executor. No pixel edits.",
  "fixtureSource": "// MIT License - Copyright (c) 2026 wallstop\n// Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE\n\nnamespace WallstopStudios.UnityHelpers.Tests.Editor.Capture\n{\n#if UNITY_EDITOR && UNITY_6000_0_OR_NEWER\n    using System;\n    using System.Collections;\n    using System.IO;\n    using System.Reflection;\n    using NUnit.Framework;\n    using UnityEditor;\n    using UnityEngine;\n    using UnityEngine.UIElements;\n    using WallstopStudios.UnityHelpers.Tests.Core;\n    using WallstopStudios.UnityHelpers.Tests.EditorFramework;\n\n    [TestFixture]\n    public sealed class BuildProfileSettingsCaptureTests : CommonTestBase\n    {\n        [Test]\n        public void CaptureSettings()\n        {\n            Assert.IsTrue(EditorSurfaceCapture.IsSupported, EditorSurfaceCapture.UnsupportedReason);\n            string output = Environment.GetEnvironmentVariable(\"UH_BUILD_PROFILE_CAPTURE_OUTPUT\");\n            Assert.IsFalse(string.IsNullOrWhiteSpace(output));\n            MethodInfo discover = typeof(SettingsService).GetMethod(\n                \"FetchSettingsProviders\",\n                BindingFlags.NonPublic | BindingFlags.Static,\n                null,\n                Type.EmptyTypes,\n                null\n            );\n            Assert.IsTrue(discover != null);\n            SettingsProvider[] providers = discover.Invoke(null, null) as SettingsProvider[];\n            Assert.IsTrue(providers != null);\n            SettingsProvider selected = null;\n            foreach (SettingsProvider provider in providers)\n            {\n                if (provider.settingsPath == \"Project/Wallstop Studios/Unity Helpers\")\n                {\n                    selected = provider;\n                    break;\n                }\n            }\n            Assert.IsTrue(selected != null);\n            Assert.IsTrue(selected.guiHandler != null);\n            VisualElement surface = new();\n            surface.style.width = 1100;\n            surface.style.height = 850;\n            surface.style.backgroundColor = EditorGUIUtility.isProSkin\n                ? new Color(0.22f, 0.22f, 0.22f)\n                : new Color(0.76f, 0.76f, 0.76f);\n            int calls = 0;\n            IMGUIContainer content = new(() =>\n            {\n                ++calls;\n                selected.guiHandler(string.Empty);\n            });\n            content.style.width = 1080;\n            content.style.marginLeft = 10;\n            content.style.marginTop = 10;\n            surface.Add(content);\n            EditorSurfaceCaptureResult? captured = null;\n            IEnumerator context = TestIMGUIExecutor.Run(\n                () =>\n                {\n                    if (Event.current.type == EventType.Repaint)\n                    {\n                        captured = EditorSurfaceCapture.Capture(surface, 1100, 850, output);\n                    }\n                },\n                TestIMGUIExecutorBudget.Default,\n                strictLogs: true\n            );\n            Assert.IsFalse(context.MoveNext());\n            Assert.IsTrue(captured.HasValue);\n            EditorSurfaceCaptureResult result = captured.Value;\n            TestContext.WriteLine($\"GUI draws={calls}; colors={result.DistinctColorCount}\");\n            Assert.Less(16, result.DistinctColorCount);\n            Assert.IsTrue(result.OnlyCursorRectErrors, result.RenderErrorSummary);\n            File.WriteAllText(output + \".txt\", result.ToString());\n        }\n    }\n#endif\n}\n",
  "controllerSource": "$ErrorActionPreference = 'Stop'\n$repository = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../../..'))\n$project = Join-Path ([IO.Path]::GetTempPath()) 'uh-session-20261114-morning-validation'\n$pwsh = Join-Path $env:USERPROFILE 'scoop/apps/pwsh/current/pwsh.exe'\n$paths=@{settings='Editor/Settings/UnityHelpersSettings.cs';sync='Editor/Tools/BuildProfileSceneSync.cs';tests='Tests/Editor/Tools/BuildProfileSceneSyncTests.cs'}\n$code=1\n@{pid=$PID;startUtc=[DateTime]::UtcNow}|ConvertTo-Json|Set-Content(Join-Path $PSScriptRoot 'capture-settings-gui-scope-identity.json')\nfunction Install-Phase([string]$phase) {\n foreach($name in $paths.Keys){\n  $target=Join-Path $repository $paths[$name]\n  $current=(Get-FileHash $target).Hash\n  $allowed=@('before','after')|ForEach-Object {(Get-FileHash(Join-Path $PSScriptRoot \"capture-$name-$_.cs.txt\")).Hash}\n  if($current -notin $allowed){throw \"Unrecognized capture input: $name\"}\n  Copy-Item (Join-Path $PSScriptRoot \"capture-$name-$phase.cs.txt\") $target -Force\n }\n}\ntry {\n foreach($phase in @('before','after')) {\n  Install-Phase $phase\n  $env:UH_BUILD_PROFILE_CAPTURE_OUTPUT=Join-Path $PSScriptRoot \"build-profile-settings-$phase.png\"\n  $artifacts=Join-Path $PSScriptRoot \"capture-settings-gui-scope-$phase\"\n  & $pwsh -NoProfile -File (Join-Path $repository 'scripts/unity/run-ci-tests.ps1') -UnityVersion '6000.6.7f1' -TestMode editmode -EnableEditorGraphics -AssemblyNames 'WallstopStudios.UnityHelpers.Tests.Editor.Capture' -TestFilter 'BuildProfileSettingsCaptureTests' -TestCategory '!Performance;!Stress' -RepoRoot $repository -ProjectPath $project -ArtifactsPath $artifacts -UnityEditorPath (Join-Path ${env:ProgramFiles} 'Unity/Hub/Editor/6000.6.7f1/Editor/Unity.exe') *> (Join-Path $PSScriptRoot \"capture-settings-$phase-driver.log\")\n  if($LASTEXITCODE -ne 0){throw \"Settings capture $phase failed $LASTEXITCODE\"}\n  [xml]$xml=Get-Content(Join-Path $artifacts 'results.xml') -Raw\n  $cases=@($xml.SelectNodes('//test-case'))\n  if($cases.Count -ne 1 -or $cases[0].result -ne 'Passed' -or @($xml.SelectNodes('//test-suite[@result=\"Failed\"]')).Count){throw 'Missing or failed capture case/suite'}\n  $receipt=Get-Content(Join-Path $artifacts 'unity.execution-diagnostics.json') -Raw|ConvertFrom-Json\n  if($receipt.Process.RawExitCode -ne 0 -or -not $receipt.Process.StandardOutputEndObserved -or -not $receipt.Process.StandardErrorEndObserved -or $receipt.Process.OutputDrainStopped){throw 'Unhealthy capture process'}\n }\n $code=0\n} catch { $_|Out-String|Set-Content(Join-Path $PSScriptRoot 'capture-settings-gui-scope-controller.log') }\nfinally {\n try {Install-Phase 'after'} catch {$code=1;$_|Out-String|Set-Content(Join-Path $PSScriptRoot 'capture-settings-gui-scope-restore-error.log')}\n @{exitCode=$code;completedUtc=[DateTime]::UtcNow}|ConvertTo-Json|Set-Content(Join-Path $PSScriptRoot 'capture-settings-gui-scope-result.json')\n}\nexit $code\n",
  "captures": [
    {
      "phase": "before",
      "pngSha256": "dd5d7084ccfd9136f565b00157515e66b3e73ebb9af139c319f45c1e8133a39e",
      "metadata": "D:\\Code\\Packages\\Packages\\com.wallstop-studios.unity-helpers\\progress\\.artifacts\\session-20261114-evening\\build-profile-settings-before.png 1100x850 bytes=56819 pngColorType=2 distinctColors=259 renderErrors=0 isProSkin=False unity=6000.6.7f1",
      "processReceipt": {
        "CapturedUtc": "2026-11-14T18:26:43.0580969Z",
        "Label": "Run Unity 6000.6.7f1 editmode tests",
        "Process": {
          "ProcessId": 68432,
          "RawExitCode": 0,
          "StandardOutputEndObserved": true,
          "StandardErrorEndObserved": true,
          "OutputDrainStopped": false,
          "State": "observed",
          "ExecutablePath": "C:\\Program Files\\Unity\\Hub\\Editor\\6000.6.7f1\\Editor\\Unity.exe",
          "MachineName": "SPICY"
        }
      },
      "sourceSha256": {
        "settings": "a876bc8e53464901c9b75e5df01fa15c31adfe7182221d6e81dc3b54cb3a96ad",
        "sync": "405f94eebf4b570b19cb83f91915bb8d41aa9d31136cbc6746cb3546d6af3daa",
        "tests": "405f94eebf4b570b19cb83f91915bb8d41aa9d31136cbc6746cb3546d6af3daa"
      }
    },
    {
      "phase": "after",
      "pngSha256": "643259f6fbc718242f11866a7ab6d9c6ee2223ed7a5488f7eb9fc39f410f9105",
      "metadata": "D:\\Code\\Packages\\Packages\\com.wallstop-studios.unity-helpers\\progress\\.artifacts\\session-20261114-evening\\build-profile-settings-after.png 1100x850 bytes=58611 pngColorType=2 distinctColors=259 renderErrors=0 isProSkin=False unity=6000.6.7f1",
      "processReceipt": {
        "CapturedUtc": "2026-11-14T18:27:16.9662293Z",
        "Label": "Run Unity 6000.6.7f1 editmode tests",
        "Process": {
          "ProcessId": 62564,
          "RawExitCode": 0,
          "StandardOutputEndObserved": true,
          "StandardErrorEndObserved": true,
          "OutputDrainStopped": false,
          "State": "observed",
          "ExecutablePath": "C:\\Program Files\\Unity\\Hub\\Editor\\6000.6.7f1\\Editor\\Unity.exe",
          "MachineName": "SPICY"
        }
      },
      "sourceSha256": {
        "settings": "b9d7fd209776a941e0fc5084e18476cbc27b94652e47c2560b03859f9b930efd",
        "sync": "f6e1a0c283e839111863007aea4a7a09267b7ead644dbf9b60b9dfdcc8684b3b",
        "tests": "62d94cc1104051489130391cbf361071eea5395f79d9247d2714bddac97c6d6b"
      }
    }
  ]
}
