# Phase 13 — Release acceptance gates

## Purpose

This phase defines a conservative release gate for a staging or production candidate. It does not claim that the application has passed the gate. It makes missing prerequisites explicit and provides repeatable commands for a deployment operator.

## Required release gate

On the target server, after Composer dependencies are installed and `.env` is configured:

```bash
scripts/release-gate.sh
```

The gate requires:
- committed `composer.lock`;
- `.env` with production environment, debug disabled, strong APP_KEY, MySQL and secure session cookies;
- installed Composer dependencies;
- PHP PDO MySQL;
- Composer metadata validation and dependency audit;
- Laravel application boot and route compilation;
- database migration status;
- PHPUnit feature tests.

The script does not run migrations or modify application data.

## HTTP smoke test

After deployment behind HTTPS:

```bash
scripts/http-smoke-test.sh https://your-hmis-hostname
```

It checks only public `/up` and `/login` endpoints. It does not prove authentication, patient privacy, clinical correctness or role isolation.

## Release evidence to retain

For each release candidate, retain:
1. Git commit identifier and reviewed `composer.lock`.
2. Composer validation and dependency audit output.
3. Docker image digest and build logs.
4. `php artisan about` and `route:list` output.
5. Migration status and migration logs.
6. PHPUnit test report.
7. HTTP smoke-test output.
8. Backup and restore exercise evidence.
9. Security assessment and penetration-test report.
10. Clinical governance and privacy approvals.

## Release decision

A technical script pass is necessary but not sufficient. Release approval also requires independent security, privacy, clinical safety, operational and executive sign-off. Do not process real patient data until all applicable approvals are complete.

## Current project status

This build environment has PHP and Node.js but lacks Composer, Docker, MySQL and PDO database drivers. `composer.lock` is absent. Therefore the release gate cannot pass here; only script syntax and static source checks can be performed.
