# Phase 17 Runtime Test Harness

This package adds a reproducible environment for the checks that could not be performed
inside the earlier build environment.

## What it creates

- Laravel 13 fresh application
- VTU overlay applied on top
- Composer dependency installation
- MySQL 8.4
- Redis 7
- PHP 8.3 FPM
- queue worker
- scheduler loop

## One-command test

Requirements:
- Docker
- Docker Compose

Run:

```bash
./scripts/run_full_runtime_test.sh
```

The script will:
1. create a fresh Laravel 13 app
2. merge VTU dependencies
3. run Composer
4. start MySQL/Redis
5. generate APP_KEY
6. run fresh migrations + seeders
7. list routes
8. run `vtu:health`
9. list scheduler
10. run PHPUnit
11. start app/worker/scheduler containers

## Money-integrity subset

```bash
./scripts/run_money_integrity_tests.sh
```

## Real sandbox smoke-test preparation

Do not put secrets into files.

Export them into your shell:

```bash
export VTPASS_API_KEY="..."
export VTPASS_PUBLIC_KEY="..."
export VTPASS_SECRET_KEY="..."
export PAYSTACK_SECRET_KEY="..."
./scripts/run_sandbox_smoke_tests.sh
```

This stores the credentials only in the disposable test database/container environment.

## Why this matters

PHP syntax checks only catch parsing errors.
This harness catches:
- Composer conflicts
- Laravel bootstrap problems
- migration errors
- route/controller resolution problems
- missing middleware aliases
- DB model problems
- queue registration problems
- scheduler errors
- PHPUnit failures
