$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 @('prepareG09State', 'g09-withdraw-dialog', 'g09-withdrawn')) { if ($capture -notmatch [regex]::Escape($required)) { throw "G09 capture state missing: $required" } } if ($capture -notmatch 'await prepareG09State\(send, action\)') { throw 'Capture runner does not prepare G09 states' } Write-Output 'CAPTURE-G09-STATES-CONTRACT PASS'