mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-23 18:55:37 -04:00
debug: add Windows markdown stress repro
This commit is contained in:
@@ -160,19 +160,36 @@ jobs:
|
||||
|
||||
windows-opentui-repro:
|
||||
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:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- version: "1.17.9"
|
||||
host: windows-latest
|
||||
name: baseline
|
||||
markdownLoops: 1
|
||||
onlyMarkdown: false
|
||||
- version: "1.17.10"
|
||||
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"
|
||||
host: windows-latest
|
||||
name: baseline
|
||||
markdownLoops: 1
|
||||
onlyMarkdown: false
|
||||
- version: "1.17.10"
|
||||
host: windows-2022
|
||||
name: baseline
|
||||
markdownLoops: 1
|
||||
onlyMarkdown: false
|
||||
runs-on: ${{ matrix.host }}
|
||||
defaults:
|
||||
run:
|
||||
@@ -189,14 +206,19 @@ jobs:
|
||||
node-version: "24.11.1"
|
||||
|
||||
- name: Run Windows standalone repro
|
||||
timeout-minutes: 15
|
||||
run: ./script/repro-windows-opentui-crash.ps1 -Version "${{ matrix.version }}"
|
||||
timeout-minutes: 30
|
||||
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
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
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
|
||||
retention-days: 7
|
||||
path: |
|
||||
|
||||
@@ -3,8 +3,10 @@ param(
|
||||
[string]$Version,
|
||||
[int]$McpLoops = 0,
|
||||
[int]$McpServers = 20,
|
||||
[int]$MarkdownLoops = 1,
|
||||
[int]$StartupSeconds = 20,
|
||||
[int]$PtySeconds = 120
|
||||
[int]$PtySeconds = 120,
|
||||
[switch]$OnlyMarkdown
|
||||
)
|
||||
|
||||
$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"
|
||||
node --version
|
||||
npm --version
|
||||
Write-Host "RUNNER_OS=$env:RUNNER_OS RUNNER_ARCH=$env:RUNNER_ARCH"
|
||||
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"
|
||||
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"
|
||||
}
|
||||
$script:PtyFailures = @()
|
||||
Invoke-PtyScenario -Scenario "text" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||
if ($Version -eq "1.17.10") {
|
||||
Invoke-PtyScenario -Scenario "markdown-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||
}
|
||||
Invoke-PtyScenario -Scenario "markdown" -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 "mcp-npx" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||
if ($Version -eq "1.17.10") {
|
||||
Invoke-PtyScenario -Scenario "mcp-npx-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||
if ($OnlyMarkdown) {
|
||||
Invoke-MarkdownScenarios -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds -Loops $MarkdownLoops
|
||||
} else {
|
||||
Invoke-PtyScenario -Scenario "text" -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 "task-permission" -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") {
|
||||
Invoke-PtyScenario -Scenario "mcp-npx-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||
}
|
||||
}
|
||||
if ($script:PtyFailures.Count -gt 0) {
|
||||
Write-Section "PTY Failures"
|
||||
|
||||
Reference in New Issue
Block a user