debug: add Windows markdown stress repro
This commit is contained in:
parent
f00fa4d760
commit
bc2cfbe065
2 changed files with 67 additions and 15 deletions
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
|
|
@ -160,19 +160,36 @@ jobs:
|
||||||
|
|
||||||
windows-opentui-repro:
|
windows-opentui-repro:
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.windows_opentui_repro == true }}
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.windows_opentui_repro == true }}
|
||||||
name: windows opentui repro (${{ matrix.version }}, ${{ matrix.host }})
|
name: windows opentui repro (${{ matrix.name }}, ${{ matrix.version }}, ${{ matrix.host }})
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- version: "1.17.9"
|
- version: "1.17.9"
|
||||||
host: windows-latest
|
host: windows-latest
|
||||||
|
name: baseline
|
||||||
|
markdownLoops: 1
|
||||||
|
onlyMarkdown: false
|
||||||
- version: "1.17.10"
|
- version: "1.17.10"
|
||||||
host: windows-latest
|
host: windows-latest
|
||||||
|
name: baseline
|
||||||
|
markdownLoops: 1
|
||||||
|
onlyMarkdown: false
|
||||||
|
- version: "1.17.10"
|
||||||
|
host: windows-latest
|
||||||
|
name: markdown-stress
|
||||||
|
markdownLoops: 10
|
||||||
|
onlyMarkdown: true
|
||||||
- version: "1.17.11"
|
- version: "1.17.11"
|
||||||
host: windows-latest
|
host: windows-latest
|
||||||
|
name: baseline
|
||||||
|
markdownLoops: 1
|
||||||
|
onlyMarkdown: false
|
||||||
- version: "1.17.10"
|
- version: "1.17.10"
|
||||||
host: windows-2022
|
host: windows-2022
|
||||||
|
name: baseline
|
||||||
|
markdownLoops: 1
|
||||||
|
onlyMarkdown: false
|
||||||
runs-on: ${{ matrix.host }}
|
runs-on: ${{ matrix.host }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|
@ -189,14 +206,19 @@ jobs:
|
||||||
node-version: "24.11.1"
|
node-version: "24.11.1"
|
||||||
|
|
||||||
- name: Run Windows standalone repro
|
- name: Run Windows standalone repro
|
||||||
timeout-minutes: 15
|
timeout-minutes: 30
|
||||||
run: ./script/repro-windows-opentui-crash.ps1 -Version "${{ matrix.version }}"
|
run: |
|
||||||
|
$reproArgs = @("-Version", "${{ matrix.version }}", "-MarkdownLoops", "${{ matrix.markdownLoops }}")
|
||||||
|
if ("${{ matrix.onlyMarkdown }}" -eq "true") {
|
||||||
|
$reproArgs += "-OnlyMarkdown"
|
||||||
|
}
|
||||||
|
./script/repro-windows-opentui-crash.ps1 @reproArgs
|
||||||
|
|
||||||
- name: Upload Windows repro artifacts
|
- name: Upload Windows repro artifacts
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: windows-opentui-repro-${{ matrix.version }}-${{ matrix.host }}-${{ github.run_attempt }}
|
name: windows-opentui-repro-${{ matrix.name }}-${{ matrix.version }}-${{ matrix.host }}-${{ github.run_attempt }}
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
path: |
|
path: |
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ param(
|
||||||
[string]$Version,
|
[string]$Version,
|
||||||
[int]$McpLoops = 0,
|
[int]$McpLoops = 0,
|
||||||
[int]$McpServers = 20,
|
[int]$McpServers = 20,
|
||||||
|
[int]$MarkdownLoops = 1,
|
||||||
[int]$StartupSeconds = 20,
|
[int]$StartupSeconds = 20,
|
||||||
[int]$PtySeconds = 120
|
[int]$PtySeconds = 120,
|
||||||
|
[switch]$OnlyMarkdown
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
@ -117,11 +119,38 @@ function Invoke-PtyScenario {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Invoke-MarkdownScenarios {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Exe,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Project,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Version,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[int]$Seconds,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[int]$Loops
|
||||||
|
)
|
||||||
|
|
||||||
|
for ($i = 1; $i -le $Loops; $i++) {
|
||||||
|
$suffix = if ($Loops -gt 1) { "-$($i.ToString('00'))" } else { "" }
|
||||||
|
if ($Version -eq "1.17.10") {
|
||||||
|
Invoke-PtyScenario -Scenario "markdown-no-native-render$suffix" -Exe $Exe -Project $Project -Version $Version -Seconds $Seconds
|
||||||
|
}
|
||||||
|
Invoke-PtyScenario -Scenario "markdown$suffix" -Exe $Exe -Project $Project -Version $Version -Seconds $Seconds
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Write-Section "Environment"
|
Write-Section "Environment"
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
Write-Host "RUNNER_OS=$env:RUNNER_OS RUNNER_ARCH=$env:RUNNER_ARCH"
|
Write-Host "RUNNER_OS=$env:RUNNER_OS RUNNER_ARCH=$env:RUNNER_ARCH"
|
||||||
Write-Host "PROCESSOR_ARCHITECTURE=$env:PROCESSOR_ARCHITECTURE"
|
Write-Host "PROCESSOR_ARCHITECTURE=$env:PROCESSOR_ARCHITECTURE"
|
||||||
|
Write-Host "MarkdownLoops=$MarkdownLoops OnlyMarkdown=$OnlyMarkdown"
|
||||||
|
if ($MarkdownLoops -lt 1) {
|
||||||
|
throw "MarkdownLoops must be >= 1"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Section "Install opencode-ai@$Version"
|
Write-Section "Install opencode-ai@$Version"
|
||||||
npm uninstall -g opencode-ai opencode-windows-x64 2>$null | Out-Host
|
npm uninstall -g opencode-ai opencode-windows-x64 2>$null | Out-Host
|
||||||
|
|
@ -202,16 +231,17 @@ try {
|
||||||
throw "npm install @lydell/node-pty failed with exit code $LASTEXITCODE"
|
throw "npm install @lydell/node-pty failed with exit code $LASTEXITCODE"
|
||||||
}
|
}
|
||||||
$script:PtyFailures = @()
|
$script:PtyFailures = @()
|
||||||
Invoke-PtyScenario -Scenario "text" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
if ($OnlyMarkdown) {
|
||||||
if ($Version -eq "1.17.10") {
|
Invoke-MarkdownScenarios -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds -Loops $MarkdownLoops
|
||||||
Invoke-PtyScenario -Scenario "markdown-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
} else {
|
||||||
}
|
Invoke-PtyScenario -Scenario "text" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
Invoke-PtyScenario -Scenario "markdown" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
Invoke-MarkdownScenarios -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds -Loops $MarkdownLoops
|
||||||
Invoke-PtyScenario -Scenario "bash-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
Invoke-PtyScenario -Scenario "bash-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
Invoke-PtyScenario -Scenario "task-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
Invoke-PtyScenario -Scenario "task-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
Invoke-PtyScenario -Scenario "mcp-npx" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
Invoke-PtyScenario -Scenario "mcp-npx" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
if ($Version -eq "1.17.10") {
|
if ($Version -eq "1.17.10") {
|
||||||
Invoke-PtyScenario -Scenario "mcp-npx-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
Invoke-PtyScenario -Scenario "mcp-npx-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($script:PtyFailures.Count -gt 0) {
|
if ($script:PtyFailures.Count -gt 0) {
|
||||||
Write-Section "PTY Failures"
|
Write-Section "PTY Failures"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue