-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 2.12 KB
/
Copy pathMakefile
File metadata and controls
63 lines (49 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Bridle — make targets for the demo + test loops.
PY ?= .venv/bin/python
PYTEST ?= .venv/bin/python -m pytest
DOCKER_COMPOSE ?= docker compose
PG_URL ?= postgres://bridle:bridle@127.0.0.1:5432/bridle
export BRIDLE_PG_URL := $(PG_URL)
.PHONY: pilot-demo demo-control-loop demo-w3 demo-refund-agent test test-postgres pg-up pg-down clean reset
## Run the v0.6 pilot demo (YAML → bundle → gateway → traffic → flip → audit/trace → fail-mode proofs)
pilot-demo: pg-up
PYTHONPATH=. $(PY) -m bridle.demo.pilot
## Run the Week 4 durable demo (Postgres-backed, simulates CP restart, central mode flip)
demo-control-loop: pg-up
PYTHONPATH=. $(PY) -m bridle.demo.control_loop_durable
## Run the Week 3 (in-memory) demo
demo-w3:
PYTHONPATH=. $(PY) -m bridle.demo.control_loop
## Run the Week 2 refund-agent demo
demo-refund-agent:
PYTHONPATH=. $(PY) -m bridle.demo.refund_agent
## Run the full product test suite (skips Postgres tests if PG unavailable)
test:
PYTHONPATH=. $(PYTEST) tests/ --ignore=tests/spikes -p no:cacheprovider
## Run the Postgres durability tests (requires `make pg-up` first)
test-postgres: pg-up
PYTHONPATH=. $(PYTEST) tests/test_postgres_durability.py -v -p no:cacheprovider
## Start Postgres in the background and wait for readiness.
pg-up:
@$(DOCKER_COMPOSE) up -d postgres > /dev/null
@for i in $$(seq 1 30); do \
if docker exec billion-baby-postgres-1 pg_isready -U bridle -d bridle > /dev/null 2>&1; then \
break; \
fi; \
sleep 0.5; \
done
@echo "[pg] up at $(PG_URL)"
## Stop Postgres
pg-down:
$(DOCKER_COMPOSE) down
## Stop background services and clean up logs
clean:
@-pkill -f "uvicorn tests.spikes" 2>/dev/null || true
@-pkill -f "litellm.*9100" 2>/dev/null || true
@-rm -f /tmp/spike_hooks*.jsonl /tmp/mock_server.* /tmp/litellm_proxy*.log /tmp/cp_proxy*.log
## Wipe Postgres tables clean — useful between demo runs
reset: pg-up
@docker exec billion-baby-postgres-1 psql -U bridle -d bridle \
-c "TRUNCATE audit_rows, sessions, policy_bundles, gateway_registry, tool_intents;" \
> /dev/null
@echo "[pg] truncated audit_rows, sessions, policy_bundles, gateway_registry, tool_intents"