| 1 | # Orion AEE local test-drive (ADR 0148) |
| 2 | # Usage: pwsh -File scripts/aee/orion-test-drive.ps1 [-Ui] [-Filter name] |
| 3 | |
| 4 | param( |
| 5 | [switch]$Ui, |
| 6 | [string]$Filter = "Category=AgentEnvironment" |
| 7 | ) |
| 8 | |
| 9 | $ErrorActionPreference = "Stop" |
| 10 | $repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..") |
| 11 | |
| 12 | Write-Host "=== Orion AEE test-drive ===" -ForegroundColor Cyan |
| 13 | Write-Host "Repo: $repoRoot" |
| 14 | Write-Host "" |
| 15 | |
| 16 | Write-Host "[1/3] Automated stress (xUnit)..." -ForegroundColor Yellow |
| 17 | Push-Location $repoRoot |
| 18 | try { |
| 19 | dotnet test "CascadeIDE.Tests\CascadeIDE.Tests.csproj" --filter $Filter -v minimal |
| 20 | if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |
| 21 | } |
| 22 | finally { |
| 23 | Pop-Location |
| 24 | } |
| 25 | |
| 26 | Write-Host "" |
| 27 | Write-Host "[2/3] MLP notes (Orion vs current build)" -ForegroundColor Yellow |
| 28 | Write-Host @" |
| 29 | - Coalesce 1.5s applies to L2 build dedup inside one verify, not to stacking /agent verify. |
| 30 | Rapid verify SUPERCEDES predecessor (implicit cancel), not a queue of CancellationTokens. |
| 31 | - Substrate: %LocalAppData%/CascadeIDE/agent-runs/{run_id}/substrate (wit.db + port.txt). |
| 32 | Parallel runs must get distinct DevPort values (automated test above). |
| 33 | - Supervised host is in-proc (supervised-inproc) until separate MSBuild worker ships. |
| 34 | Host death => AgentEnvironmentTaskDied on DataBus; PFD strip listens via RefreshPfdBackgroundStatusBar. |
| 35 | "@ |
| 36 | |
| 37 | if ($Ui) { |
| 38 | Write-Host "" |
| 39 | Write-Host "[3/3] Manual UI checklist" -ForegroundColor Yellow |
| 40 | Write-Host @" |
| 41 | 1. Open CascadeIDE.sln, open any .cs tab. |
| 42 | 2. Run /agent verify standard — watch PFD strip (AEE verify …). |
| 43 | 3. While running, edit .cs every ~500ms — expect stale epoch (DataBus); /agent status still works. |
| 44 | 4. Spam /agent verify minimal — only one active; prior runs superseded. |
| 45 | 5. /agent sandbox agent_ephemeral — check agent-runs folder under LocalAppData. |
| 46 | 6. Cancel: /agent cancel — strip clears; chat trace on completion if show_in_chat=true. |
| 47 | "@ |
| 48 | Write-Host "Launch IDE: dotnet run --project CascadeIDE.csproj" -ForegroundColor DarkGray |
| 49 | } |
| 50 | else { |
| 51 | Write-Host "" |
| 52 | Write-Host "[3/3] Skipped UI (-Ui to print manual checklist)" -ForegroundColor DarkGray |
| 53 | } |
| 54 | |
| 55 | Write-Host "" |
| 56 | Write-Host "Done." -ForegroundColor Green |
| 57 | |