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
This commit is contained in:
¨NW¨
2026-04-06 00:48:21 +01:00
parent fa68141d47
commit 1703247651
6 changed files with 314 additions and 15 deletions

View File

@@ -0,0 +1,88 @@
# Evolution Test Containers
# Run multiple workflow tests in parallel
version: '3.8'
services:
# Evolution test runner for feature workflow
evolution-feature:
build:
context: ../..
dockerfile: docker/evolution-test/Dockerfile
container_name: evolution-feature
environment:
- WORKFLOW_TYPE=feature
- TOKEN_BUDGET=50000
- TIME_BUDGET=300
- MIN_COVERAGE=80
volumes:
- ../../.kilo/logs:/app/.kilo/logs
- ../../src:/app/src
command: bun test --reporter=json --coverage
# Evolution test runner for bugfix workflow
evolution-bugfix:
build:
context: ../..
dockerfile: docker/evolution-test/Dockerfile
container_name: evolution-bugfix
environment:
- WORKFLOW_TYPE=bugfix
- TOKEN_BUDGET=20000
- TIME_BUDGET=120
- MIN_COVERAGE=90
volumes:
- ../../.kilo/logs:/app/.kilo/logs
- ../../src:/app/src
command: bun test --reporter=json --coverage
# Evolution test runner for refactor workflow
evolution-refactor:
build:
context: ../..
dockerfile: docker/evolution-test/Dockerfile
container_name: evolution-refactor
environment:
- WORKFLOW_TYPE=refactor
- TOKEN_BUDGET=40000
- TIME_BUDGET=240
- MIN_COVERAGE=95
volumes:
- ../../.kilo/logs:/app/.kilo/logs
- ../../src:/app/src
command: bun test --reporter=json --coverage
# Evolution test runner for security workflow
evolution-security:
build:
context: ../..
dockerfile: docker/evolution-test/Dockerfile
container_name: evolution-security
environment:
- WORKFLOW_TYPE=security
- TOKEN_BUDGET=30000
- TIME_BUDGET=180
- MIN_COVERAGE=80
volumes:
- ../../.kilo/logs:/app/.kilo/logs
- ../../src:/app/src
command: bun test --reporter=json --coverage
# Fitness aggregator - collects results from all containers
fitness-aggregator:
image: oven/bun:1
container_name: fitness-aggregator
depends_on:
- evolution-feature
- evolution-bugfix
- evolution-refactor
- evolution-security
volumes:
- ../../.kilo/logs:/app/.kilo/logs
working_dir: /app
command: |
sh -c "
echo 'Aggregating fitness scores...'
cat .kilo/logs/fitness-history.jsonl | tail -4 > .kilo/logs/fitness-latest.jsonl
echo 'Fitness aggregation complete.'
"