$ErrorActionPreference='Stop' . 'C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/env.ps1' $taskExe=Join-Path $PSScriptRoot 'label_tests.exe' $taskHash=(Get-FileHash -LiteralPath $taskExe -Algorithm SHA256).Hash.ToLowerInvariant() $taskListLog=Join-Path $PSScriptRoot 'list.log' $taskTestsLog=Join-Path $PSScriptRoot 'tests.log' if ((Test-Path -LiteralPath $taskListLog) -or (Test-Path -LiteralPath $taskTestsLog)) { throw 'Refusing to overwrite runtime evidence' } & $taskExe --list 2>&1 | Tee-Object -FilePath $taskListLog $taskListExit=$LASTEXITCODE $taskListed=Get-Content -Raw -LiteralPath $taskListLog $taskCount=[regex]::Matches($taskListed,'(?m)^[^\r\n]+: test\r?$').Count if ($taskListExit -ne 0 -or $taskCount -ne 18) { throw 'The standalone listing must contain exactly18 tests' } $taskStart=[DateTime]::UtcNow.ToString('o') & $taskExe --nocapture 2>&1 | Tee-Object -FilePath $taskTestsLog $taskExit=$LASTEXITCODE $taskOutput=Get-Content -Raw -LiteralPath $taskTestsLog $taskPassed=$taskExit -eq 0 -and $taskOutput -match 'test result: ok\. 17 passed; 0 failed; 1 ignored;' [ordered]@{source='903d85dda403b93731c05a08b97fa7d257d012dd';executable=$taskExe;sha256=$taskHash;listed=$taskCount;startUtc=$taskStart;endUtc=[DateTime]::UtcNow.ToString('o');exitCode=$taskExit;expectedResult=$taskPassed} | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $PSScriptRoot 'tests-receipt.json') -Encoding utf8 if (-not $taskPassed) { throw 'Standalone normal test gate failed' } & 'C:/Users/User/Documents/Git/ARCADIA-Studio/.local/scenario-layout-ytr83r-20260913/harness/experiments/scenario-label-measurement-20260913/run-font-version-test.ps1' -TestExecutable $taskExe -ExpectedSha256 $taskHash -RunDirectory (Join-Path $PSScriptRoot 'font-version') -TestName 'scenario_label::tests::actual_font_load_rejects_retained_label_and_old_session' if ((Get-FileHash -LiteralPath $taskExe -Algorithm SHA256).Hash.ToLowerInvariant() -ne $taskHash) { throw 'Test binary changed during execution' }