Phase 2 is complete when all deliverables function together as a coherent system. This milestone is the explicit completion gate. It consists of three artefacts: 1. `make e2e-smoke` — a new end-to-end smoke test that uses a real OpenAI sandbox API key to make a real LLM call through the full proxy stack and verifie
Milestone 2.6.2 — Phase 2 Exit Gate and Handoff Document
Status: Planned
Goal: 2.6 — Phase 2 quality gate
Phase: 2 — Single Provider End-to-End
Estimated effort: 1 day
Why This Milestone Exists
Phase 2 is complete when all deliverables function together as a coherent system. This milestone is the explicit completion gate. It consists of three artefacts:
make e2e-smoke— a new end-to-end smoke test that uses a real OpenAI sandbox API key to make a real LLM call through the full proxy stack and verifies the response is a valid completion.CURRENT_STATE.mdupdate — documents what Phase 2 delivered and what Phase 3 begins with.- Phase 2 exit checklist — each item signed off before Phase 3 begins.
Branch
chore/m2-6-2-phase2-exit-gate
PR Title
chore(docs): Phase 2 exit gate, e2e smoke test, and CURRENT_STATE update (m2.6.2)
Phase 2 Exit Checklist
All of the following must be true before this milestone is marked complete:
Functionality:
-
POST /v1/chat/completionsreturns a real OpenAI completion for a valid request - Streaming returns SSE tokens in real time
- Agent directive is injected into every request (verified by examining the OpenAI request log)
- Session and checkpoint created in Postgres for every turn
- ClickHouse trace record visible within 500ms of response completion
Security:
- All Phase 1 security integration tests (milestone 1.5.1) pass with no regressions
- Revoked token rejected within 5 seconds (pub/sub propagation)
- Cross-tenant agent access rejected in all test cases
Performance:
- p99 proxy overhead < 20ms at 100 concurrent requests (benchmark milestone 2.6.1 green)
- Auth LRU cache hit rate > 90% under sustained load
Operations:
-
make e2e-smokeexits 0 withOPENAI_API_KEYset - Graceful shutdown drains all requests without drops
- All Prometheus metrics visible and correctly labelled
- OTel traces visible in local Jaeger (compose-dev stack with Jaeger)
Documentation:
-
docs/app/content/roadmap/CURRENT_STATEupdated for Phase 2 completion -
docs/DEVELOPMENT_GUIDE.mdupdated with Phase 2 local setup instructions - All ADRs (0022–0031) written and indexed in
docs/adr/README.md -
services/proxy/.env.exampleincludes all Phase 2 variables (OpenAI key, ClickHouse DSN, etc.)
make e2e-smoke — Phase 2 smoke test
#!/usr/bin/env bash
# infra/scripts/e2e_smoke_p2.sh
# Phase 2 end-to-end smoke test: real OpenAI call through the proxy.
# Requires: OPENAI_API_KEY set, full local stack running (make compose-dev-up).
set -euo pipefail
: "${OPENAI_API_KEY:?OPENAI_API_KEY is required for Phase 2 e2e smoke}"
PROXY="${IBEX_PROXY_ADDR:-http://localhost:8080}"
TOKEN="${IBEX_DEV_TOKEN:-ibex_dev_sk_LOCALDEVELOPMENTONLY}"
AGENT="${IBEX_DEV_AGENT_ID:-00000000-0000-0000-0000-000000000003}"
echo "=== Phase 2 E2E Smoke Test ==="
RESPONSE=$(curl -sf -X POST "$PROXY/v1/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "X-IBEX-Agent-ID: $AGENT" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Reply with exactly: IBEX_OK"}]}')
echo "Provider response received."
# Verify the response contains expected fields
echo "$RESPONSE" | python3 -c "
import json, sys
r = json.load(sys.stdin)
assert 'choices' in r, 'Missing choices field'
assert len(r['choices']) > 0, 'Empty choices'
content = r['choices'][0]['message']['content']
assert 'IBEX_OK' in content, f'Expected IBEX_OK in response, got: {content}'
print('PASS: real OpenAI completion received and validated')
"
echo ""
echo "=== Phase 2 E2E Smoke: PASSED ==="Acceptance Criteria
-
make e2e-smokeexits 0 with a real OpenAI API key - Phase 2 exit checklist above is fully signed off
-
CURRENT_STATE.mdupdated with Phase 2 completion summary - GitHub release tag
v0.2.0created after this milestone merges
Last updated on