slotgate 0.3.0

A bounded-parallelism job runner that gives each slot its own disjoint port range, so port-binding tests run in parallel without collisions.
Documentation
# slotgate stage 1 gate: formatting, clippy, and all tests.
# Run before considering work complete; if it is not green, the work is not done.

Set-Location (Split-Path -Parent $PSScriptRoot)

function Invoke-Step {
    param(
        [string]$Name,
        [scriptblock]$Command
    )
    Write-Host ""
    Write-Host "=== $Name ===" -ForegroundColor Cyan
    & $Command
    if ($LASTEXITCODE -ne 0) {
        Write-Host "FAILED: $Name (exit $LASTEXITCODE)" -ForegroundColor Red
        exit $LASTEXITCODE
    }
}

Invoke-Step "Formatting" { cargo fmt }
Invoke-Step "Clippy" { cargo clippy --all-targets -- -D warnings }
Invoke-Step "Tests" { cargo test }

Write-Host ""
Write-Host "slotgate stage 1 passed!" -ForegroundColor Green