- Add GVFG_SDK/sdk/gvfg/formal: a TLA+ model of one channel's frame-hold protocol (read, release, stop, start and signal-change recovery) and six TLC configs: the shipped code with the reader joined before stop/start and with it running across them, and four mutations that must fail. - Add .agents/skills/verify-gvfg-frame-hold: check.ps1 runs every config against its expected result, prints counterexamples with -Trace, and reports when the covered code moves past the sync commit; f1-hardware-repro.ps1 stages a stop and start during a read on a real card. - Add a Claude Code entry in .claude/skills that points to the shared copy, and notes on which steps must run outside the Codex Windows sandbox. Validation: git diff --cached --check passed. check.ps1 met all six expectations and reported the model in step with1d89392. f1-hardware-repro.ps1 reproduced the stuck channel againstb47f27band passed against1d89392on a GIGABYTE SDI VFG100. TLC needs Java 17+ and tla2tools 1.7.4; check.ps1 -Install fetches the jar into the git-ignored formal/tools. Not yet run from Codex. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
2.0 KiB
PowerShell
38 lines
2.0 KiB
PowerShell
<#
|
|
Builds and runs f1_hardware_repro.cpp against one GVFG SDK build, on a PC with a GVFG card and a live signal on
|
|
channel 0. No viewer may hold the card while it runs.
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File .agents\skills\verify-gvfg-frame-hold\scripts\f1-hardware-repro.ps1 -GvfgBuildDir GVFG_SDK\build\<name>
|
|
|
|
The build dir must contain bin\gvfg.dll and lib\gvfg.lib. Exit codes are the program's: 0 fixed, 1 F1 reproduced,
|
|
2 not verifiable here, 3 unexpected.
|
|
#>
|
|
param([Parameter(Mandatory)][string]$GvfgBuildDir)
|
|
$ErrorActionPreference = 'Stop'
|
|
$repo = (Resolve-Path (Join-Path $PSScriptRoot '..\..\..\..')).Path
|
|
$sdk = Join-Path $repo 'GVFG_SDK\sdk\gvfg'
|
|
$build = (Resolve-Path $GvfgBuildDir).Path
|
|
foreach ($f in 'bin\gvfg.dll', 'lib\gvfg.lib') {
|
|
if (-not (Test-Path (Join-Path $build $f))) { Write-Host "Missing $f in $build"; exit 3 }
|
|
}
|
|
if (Get-Process qt6_viewer, GVFG_CardTest -ErrorAction SilentlyContinue) { Write-Host 'A viewer or card test holds the card; close it first.'; exit 2 }
|
|
|
|
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
|
$vs = & $vswhere -products * -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
|
$env:PATH = (Split-Path $vswhere) + ';' + $env:PATH
|
|
cmd /c "`"$(Join-Path $vs 'VC\Auxiliary\Build\vcvars64.bat')`" >nul 2>&1 && set" | ForEach-Object {
|
|
if ($_ -match '^([^=]+)=(.*)$') { [Environment]::SetEnvironmentVariable($matches[1], $matches[2]) }
|
|
}
|
|
|
|
$out = Join-Path $env:TEMP ("gvfg-f1-repro-" + (Split-Path $build -Leaf))
|
|
New-Item -ItemType Directory -Force $out | Out-Null
|
|
$exe = Join-Path $out 'f1_hardware_repro.exe'
|
|
& cl.exe /nologo /std:c++17 /EHsc /O2 /utf-8 "/I$sdk\include" "/I$sdk\src" (Join-Path $PSScriptRoot 'f1_hardware_repro.cpp') `
|
|
"/Fe:$exe" "/Fo:$out\\" /link "/LIBPATH:$build\lib" gvfg.lib | Out-Null
|
|
if ($LASTEXITCODE -ne 0) { Write-Host 'Compile failed'; exit 3 }
|
|
|
|
$env:PATH = (Join-Path $build 'bin') + ';' + $env:PATH
|
|
Write-Host "SDK build: $build"
|
|
& $exe
|
|
exit $LASTEXITCODE
|