$ErrorActionPreference = 'Stop' . ./.local/toolchain/env.ps1 $env:CARGO_BUILD_JOBS = '1' $evidenceRoot = Join-Path (Get-Location) '.local/text-navigation-integration-20260911' $gates = @( @{name='outline1'; args=@('test','--locked','--offline','-p','oa-core','--lib','language::outline_tests::','--','--test-threads=1')}, @{name='core1'; args=@('test','--locked','--offline','-p','oa-core','--','--test-threads=1')}, @{name='clippy1'; args=@('clippy','--locked','--offline','-p','oa-core','--all-targets','--','-D','warnings')} ) foreach ($gate in $gates) { $logPath = Join-Path $evidenceRoot ($gate.name + '.log') $statusPath = Join-Path $evidenceRoot ($gate.name + '-status.json') if ((Test-Path -LiteralPath $logPath) -or (Test-Path -LiteralPath $statusPath)) { throw "Refusing to overwrite $($gate.name)" } $started = [DateTime]::UtcNow.ToString('o') $gateArgs = $gate.args & cargo @gateArgs 2>&1 | Tee-Object -FilePath $logPath $gateExit = $LASTEXITCODE [ordered]@{started=$started;finished=[DateTime]::UtcNow.ToString('o');exitCode=$gateExit;args=$gateArgs;buildJobs=1} | ConvertTo-Json -Depth 4 | Set-Content -LiteralPath $statusPath if ($gateExit -ne 0) { exit $gateExit } }