Files
APAW/docker/evolution-test/run-evolution-test.bat
¨NW¨ 1703247651 feat: add Docker-based evolution testing with precise measurements
- Add docker/evolution-test/Dockerfile with bun, TypeScript
- Add docker/evolution-test/docker-compose.yml for parallel workflow testing
- Add run-evolution-test.sh and .bat scripts for cross-platform
- Update pipeline-judge.md with Docker-first approach:
  - Millisecond precision timing (date +%s%3N)
  - 2 decimal places for test pass rate and coverage
  - Docker container for consistent test environment
  - Multiple workflow types (feature/bugfix/refactor/security)

Enables:
- Parallel testing with docker-compose
- Consistent environment across machines
- Precise fitness measurements (ms, 2 decimals)
- Multi-workflow testing in containers
2026-04-06 00:48:21 +01:00

65 lines
1.8 KiB
Batchfile

@echo off
REM Evolution Test Runner for Windows
REM Runs pipeline-judge tests with precise measurements
setlocal enabledelayedexpansion
echo === Evolution Test Runner ===
echo.
REM Check Docker
where docker >nul 2>&1
if %errorlevel% neq 0 (
echo Error: Docker not found
echo Please install Docker Desktop first:
echo winget install Docker.DockerDesktop
echo.
echo Or run tests locally ^(less precise^):
echo bun test --reporter=json --coverage
exit /b 1
)
REM Check Docker daemon
docker info >nul 2>&1
if %errorlevel% neq 0 (
echo Warning: Docker daemon not running
echo Please start Docker Desktop and try again
exit /b 1
)
REM Get workflow type
set WORKFLOW=%1
if "%WORKFLOW%"=="" set WORKFLOW=feature
echo Running evolution test for: %WORKFLOW%
echo.
REM Build container
echo Building evolution test container...
docker-compose -f docker/evolution-test/docker-compose.yml build
REM Run test
if "%WORKFLOW%"=="all" (
echo Running ALL workflow tests in parallel...
docker-compose -f docker/evolution-test/docker-compose.yml up
docker-compose -f docker/evolution-test/docker-compose.yml up fitness-aggregator
) else (
docker-compose -f docker/evolution-test/docker-compose.yml up evolution-%WORKFLOW%
)
REM Show results
echo.
echo === Test Results ===
if exist .kilo\logs\fitness-history.jsonl (
echo Latest fitness scores:
powershell -Command "Get-Content .kilo\logs\fitness-history.jsonl -Tail 4 | ForEach-Object { $j = $_ | ConvertFrom-Json; Write-Host (' ' + $j.workflow + ': fitness=' + $j.fitness + ', time=' + $j.time_ms + 'ms, tokens=' + $j.tokens) }"
) else (
echo No fitness history found
)
REM Cleanup
echo.
echo Cleaning up...
docker-compose -f docker/evolution-test/docker-compose.yml down -v 2>nul
echo Done!