[AZ-1133] Add perf gate preflight before PT-01

Probe API reachability after JWT mint; exit 7 with compose-up
instructions when the perf stack is down. Document in environment
and containerization guides.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-06-26 17:56:33 +03:00
parent fb9e3ee31a
commit 67530eb169
8 changed files with 93 additions and 2 deletions
@@ -0,0 +1,32 @@
# Batch Report
**Batch**: 1
**Tasks**: AZ-1133_perf_gate_preflight
**Date**: 2026-06-26
## Task Results
| Task | Status | Files Modified | Tests | AC Coverage | Issues |
|------|--------|---------------|-------|-------------|--------|
| AZ-1133 | Done | 3 files | curl probe pass | 4/4 ACs covered | None |
## AC Test Coverage: All covered
| AC | Evidence |
|----|----------|
| AC-1 | `preflight_api_reachable` called after JWT mint, before PT-01 banner in `run-performance-tests.sh` |
| AC-2 | Isolated curl probe to `localhost:19999``curl_exit=7`; script prints compose-up and `exit 7` |
| AC-3 | HTTP response path proceeds (any non-zero curl exit only triggers preflight fail) |
| AC-4 | `environment.md` + `containerization.md` updated |
## Code Review Verdict: PASS
- Preflight uses same `CURL_OPTS` / `AUTH_HEADER` as PT-01
- `set +e` / `set -e` scoped around probe — does not weaken global `pipefail`
- Exit code 7 reserved for unreachable API per task spec
- Docs cross-link preflight + exit 7
## Auto-Fix Attempts: 0
## Stuck Agents: None
## Next Batch: All tasks complete
@@ -0,0 +1,15 @@
# Implementation Completeness — Cycle 16
## Per-task classification
| Task | Verdict | Evidence |
|------|---------|----------|
| AZ-1133 | PASS | `preflight_api_reachable` in `scripts/run-performance-tests.sh`; docs in `environment.md`, `containerization.md` |
No scaffold markers. No named runtime dependencies beyond curl/dotnet already in harness.
## System Pipeline Audit
N/A — tooling-only cycle; no production pipeline changes.
**Gate**: PASS — proceed to test handoff.
@@ -0,0 +1,19 @@
# Implementation Report — perf_gate_preflight (cycle 16)
**Cycle**: 16
**Tasks**: AZ-1133 (1 SP, 1 batch)
**Feature slug**: perf_gate_preflight
## Summary
Added `preflight_api_reachable` to `scripts/run-performance-tests.sh`. After JWT mint and before PT-01, the script probes `$API_URL` with the same TLS trust and Bearer token as the perf scenarios. Connection/TLS failures exit **7** with the perf overlay compose-up command. Documentation updated in `environment.md` and `containerization.md`.
## Batches
| Batch | Tasks | Verdict |
|-------|-------|---------|
| batch_01_cycle16 | AZ-1133 | PASS |
## Test handoff
Full suite gate deferred to autodev Step 11 (`test-run` skill) per implement Step 16 handoff rule.