$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $capture = Get-Content -LiteralPath (Join-Path $root 'scripts/capture-chrome-page.js') -Raw -Encoding utf8 foreach ($required in @('prepareT03T06State', 't06-conflict-help')) { if ($capture -notmatch [regex]::Escape($required)) { throw "T03-T06 capture state missing: $required" } } if ($capture -notmatch 'await prepareT03T06State\(send, action\)') { throw 'Capture runner does not prepare T03-T06 states' } Write-Output 'CAPTURE-T03-T06-STATES-CONTRACT PASS'