Add Recon and SubnetRecon mega-test gates after parallel landings.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Wire focused Go/Vitest/E2E slices in test-suite.ps1 and refresh README/PROBLEMS counts for deploy and subnet recon.
This commit is contained in:
AetherForge
2026-06-07 12:03:08 -07:00
parent 5dd5b1d894
commit 7eafea09f7
3 changed files with 90 additions and 3 deletions

View File

@@ -1,9 +1,11 @@
# AetherForge - full test suite runner
# AetherForge - full test suite runner
param(
[switch]$SkipE2E,
[switch]$SkipBuild,
[switch]$Verbose,
[switch]$ReconOnly,
[switch]$Recon,
[switch]$SubnetRecon,
[switch]$P2,
[switch]$S3Swarm,
[switch]$CloudMap,
@@ -248,6 +250,70 @@ if ($P2) {
Write-Host " P2-only run complete (run full suite phase 8 for Playwright E2E)" -ForegroundColor Green
exit 0
}
if ($SubnetRecon) {
Invoke-Phase "Subnet recon (LAN sweep + fleet discoveries)" {
Push-Location (Join-Path $Root "agent")
go test ./client/... ./config/... -run SubnetRecon -count=1
go test ./deploy/... -run SubnetRecon -count=1
Pop-Location
Push-Location (Join-Path $Root "server\web")
if (-not (Test-Path "node_modules")) { npm install --silent }
npm run test -- --run src/help/fleetDiscoveries.test.ts
Pop-Location
}
Exit-FeatureRun "SubnetRecon"
}
if ($Recon) {
Invoke-Phase "Deploy recon (engine + API + UI)" {
Push-Location (Join-Path $Root "server")
go test ./internal/recon/... -count=1
go test ./internal/api/... -run "Recon|DeployKit|FleetSpread" -count=1
Pop-Location
Push-Location (Join-Path $Root "server\web")
if (-not (Test-Path "node_modules")) { npm install --silent }
npm run test -- --run src/help/deployRecon.test.ts src/help/fleetDiscoveries.test.ts src/pages/DeployReconPage.test.tsx src/help/reconRisk.test.ts src/components/Fleet/ReconBadges.test.tsx src/components/Fleet/CrucibleExpandedOps.test.tsx
Pop-Location
}
if (-not $SkipE2E) {
Invoke-Phase "Deploy recon E2E smoke (Playwright)" {
$DataDir = Join-Path $env:TEMP ("aether-recon-e2e-" + [guid]::NewGuid().ToString("n"))
New-Item -ItemType Directory -Force -Path $DataDir | Out-Null
$E2EUser = if ($env:AETHERFORGE_E2E_USER) { $env:AETHERFORGE_E2E_USER } else { "testuser" }
$E2EPass = if ($env:AETHERFORGE_E2E_PASS) { $env:AETHERFORGE_E2E_PASS } else { "testpass" }
[System.IO.File]::WriteAllText((Join-Path $DataDir "users.json"), (@{ $E2EUser = $E2EPass } | ConvertTo-Json -Compress))
$ServerExe = Join-Path $Root "bin\miner-server.exe"
if (-not (Test-Path $ServerExe)) {
Push-Location (Join-Path $Root "server")
go build -o $ServerExe .
Pop-Location
}
$env:AETHERFORGE_E2E = "1"
$proc = Start-Process -FilePath $ServerExe -ArgumentList "-port","18989","-data",$DataDir -WorkingDirectory $Root -PassThru -WindowStyle Hidden
try {
$ready = $false
for ($i = 0; $i -lt 30; $i++) {
try {
$r = Invoke-RestMethod "http://127.0.0.1:18989/api/v1/health" -TimeoutSec 2
if ($r.status -eq "ok") { $ready = $true; break }
} catch {}
Start-Sleep -Seconds 1
}
if (-not $ready) { throw "recon E2E server not healthy on :18989" }
Push-Location (Join-Path $Root "server\web")
$env:AETHERFORGE_URL = "http://127.0.0.1:18989"
npx playwright test e2e/deploy-recon.spec.ts --config playwright.config.ts
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) { throw "deploy-recon E2E failed (exit $LASTEXITCODE)" }
Pop-Location
} finally {
if ($proc -and -not $proc.HasExited) { Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue }
Remove-Item $DataDir -Recurse -Force -ErrorAction SilentlyContinue
}
}
}
Exit-FeatureRun "Recon"
}
if ($ReconOnly) {
Invoke-Phase "Fleet recon (focused)" {
Push-Location (Join-Path $Root "server")
@@ -270,6 +336,22 @@ if ($ReconOnly) {
exit 0
}
if ($Recon) {
Invoke-Phase "Deploy Recon (browser spread)" {
Push-Location (Join-Path $Root "server")
Invoke-GoTest "./internal/recon/..."
go test ./internal/api/... -run "^(TestReconScan|TestGetDeployKit|TestResolveRecon)" -count=1
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) { throw "api deploy-recon tests failed (exit $LASTEXITCODE)" }
Pop-Location
Push-Location (Join-Path $Root "server\web")
if (-not (Test-Path "node_modules")) { Invoke-Npm @("install", "--silent") }
Invoke-Npm @("run", "test", "--", "--run", "src/help/deployRecon.test.ts", "src/pages/DeployReconPage.test.tsx")
Pop-Location
}
Exit-FeatureRun "Deploy Recon"
}
Invoke-Phase "1/8 Go server tests" {
Push-Location (Join-Path $Root "server")
go test ./... -count=1