Skip to content

Commit 97aca00

Browse files
authored
Merge pull request #5 from airblackbox/refresh/current-stack
Rebuild platform around the consolidated stack
2 parents a1c26f3 + 17d891c commit 97aca00

27 files changed

Lines changed: 682 additions & 2223 deletions

.env.example

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# AIR Platform Configuration
22
# Copy to .env and fill in your values
33

4-
# LLM Provider (required for live replay)
4+
# LLM provider key — sent by YOUR client code, not stored by the gateway.
5+
# Only needed to run the live round-trip integration test.
56
OPENAI_API_KEY=sk-...
67

7-
# MinIO (defaults work for local dev)
8+
# Upstream provider the gateway proxies to (default: OpenAI)
9+
# PROVIDER_URL=https://api.openai.com
10+
11+
# MinIO prompt vault credentials (defaults work for local dev)
812
MINIO_ROOT_USER=minioadmin
913
MINIO_ROOT_PASSWORD=minioadmin
1014

11-
# Optional: Gateway authentication
15+
# Optional: require clients to send X-Gateway-Key with this value
1216
# GATEWAY_KEY=your-secret-key
17+
18+
# Optional: pin the HMAC signing key for the audit chain.
19+
# When unset, the gateway generates one and persists it in ./runs/.air-signing-key
20+
# TRUST_SIGNING_KEY=

.github/workflows/ci.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,44 @@ jobs:
2121
python-version: "3.12"
2222

2323
- name: Lint test files
24+
run: python -m py_compile tests/*.py
25+
26+
integration:
27+
runs-on: ubuntu-latest
28+
needs: validate
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Start the stack
33+
run: docker compose up -d --quiet-pull
34+
35+
- name: Wait for gateway health
2436
run: |
25-
python -m py_compile tests/conftest.py
26-
python -m py_compile tests/test_health.py
27-
python -m py_compile tests/test_episode_flow.py
28-
python -m py_compile tests/test_policy_flow.py
29-
python -m py_compile tests/test_end_to_end.py
37+
for i in $(seq 1 30); do
38+
curl -sf http://localhost:8080/health && exit 0
39+
sleep 2
40+
done
41+
echo "Gateway never became healthy" >&2
42+
docker compose logs
43+
exit 1
44+
45+
- name: Set up Python 3.12
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.12"
49+
50+
- name: Install test dependencies
51+
run: pip install -r requirements.txt
52+
53+
- name: Run integration tests
54+
env:
55+
AIR_REQUIRE_STACK: "1"
56+
run: python -m pytest tests/ -v
57+
58+
- name: Stack logs on failure
59+
if: failure()
60+
run: docker compose logs
61+
62+
- name: Tear down
63+
if: always()
64+
run: docker compose down -v

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ __pycache__
33
*.pyc
44
.pytest_cache
55
*.egg-info
6+
runs/

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@ All notable changes to **AIR Platform** will be documented in this file.
44

55
This project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## [0.2.0] — 2026-07-13
8+
9+
### Changed
10+
- Rebuilt Docker Compose around the consolidated stack: gateway now pulled as the
11+
signed `ghcr.io/airblackbox/airblackbox` image; collector built directly from the
12+
public repo. No local sibling checkouts required — `docker compose up` works from
13+
a fresh clone.
14+
- Rewrote README for the current ecosystem (airblackbox, air-gate, air-blackbox-mcp,
15+
compliance-action, tombstone); removed links to archived repositories.
16+
- Replaced integration tests targeting the retired Episode Store / Policy Engine /
17+
Eval Harness services with tests for the gateway audit surface (`/health`,
18+
`/v1/audit`, `/v1/analytics`, `/v1/audit/export`) plus an optional live LLM
19+
round-trip (needs `OPENAI_API_KEY`).
20+
- Tests now skip with instructions when the stack is down (hard-fail in CI via
21+
`AIR_REQUIRE_STACK=1`).
22+
- CI now boots the full compose stack and runs the integration suite.
23+
24+
### Added
25+
- `collector.yaml` — local-only OTel pipeline config mounted over the image default
26+
(normalize → prompt vault → redact/metrics → batch). Nothing leaves your machine.
27+
- `guardrails.yaml` — gateway guardrails config (budgets, loop/retry protection,
28+
tool allow/blocklists).
29+
30+
### Fixed
31+
- Invalid `build-backend` in pyproject.toml (`setuptools.backends._legacy:_Backend`
32+
`setuptools.build_meta`).
33+
- Worked around duplicate `processors:` key in the upstream collector config that
34+
crashed the collector on boot (fix also submitted to the main repo).
35+
36+
### Removed
37+
- Obsolete tests and smoke script for archived services (`test_production.py`,
38+
`test_e2e_stack.py`, `test_end_to_end.py`, `test_episode_flow.py`,
39+
`test_policy_flow.py`).
40+
741
## [0.1.0] — 2026-02-22
842

943
- Docker Compose orchestration for full AIR Blackbox stack

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ down:
1212
clean:
1313
docker compose down -v
1414

15-
# Run integration tests
15+
# Run integration tests against the running stack
1616
test:
17-
docker compose exec eval-harness python3 -m pytest /app/tests/ -v
1817
python3 -m pytest tests/ -v
1918

2019
# View logs for all services
@@ -24,7 +23,5 @@ logs:
2423
# Check service health
2524
status:
2625
@echo "=== Gateway ===" && curl -sf http://localhost:8080/health || echo "DOWN"
27-
@echo "\n=== Episode Store ===" && curl -sf http://localhost:8100/v1/health || echo "DOWN"
28-
@echo "\n=== Policy Engine ===" && curl -sf http://localhost:8200/v1/health || echo "DOWN"
29-
@echo "\n=== MinIO ===" && curl -sf http://localhost:9000/minio/health/live || echo "DOWN"
26+
@echo "\n=== MinIO ===" && curl -sf http://localhost:9000/minio/health/live > /dev/null && echo "UP" || echo "DOWN"
3027
@echo "\n=== Jaeger ===" && curl -sf http://localhost:16686/ > /dev/null && echo "UP" || echo "DOWN"

0 commit comments

Comments
 (0)