-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (78 loc) · 4.57 KB
/
Makefile
File metadata and controls
89 lines (78 loc) · 4.57 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# MultAI — Development Targets
# Run `make check` before every commit.
VENV_PYTHON = skills/orchestrator/engine/.venv/bin/python
ENGINE = skills/orchestrator/engine
COMPARATOR = skills/comparator
LANDSCAPE = skills/landscape-researcher
.PHONY: compile test regression check budget-check landscape-smoke e2e-smoke version-check version-stamp
# ── Stage 1: Compile ──────────────────────────────────────────────────────────
compile:
@echo "=== Compile: engine files ==="
python3 -m py_compile $(ENGINE)/orchestrator.py
python3 -m py_compile $(ENGINE)/config.py
python3 -m py_compile $(ENGINE)/utils.py
python3 -m py_compile $(ENGINE)/prompt_echo.py
python3 -m py_compile $(ENGINE)/agent_fallback.py
python3 -m py_compile $(ENGINE)/rate_limiter.py
python3 -m py_compile $(ENGINE)/collate_responses.py
python3 -m py_compile $(ENGINE)/cli.py
python3 -m py_compile $(ENGINE)/engine_setup.py
python3 -m py_compile $(ENGINE)/tab_manager.py
python3 -m py_compile $(ENGINE)/status_writer.py
python3 -m py_compile $(ENGINE)/prompt_loader.py
python3 -m py_compile $(ENGINE)/retry_handler.py
@echo "=== Compile: comparator files ==="
python3 -m py_compile $(COMPARATOR)/matrix_ops.py
python3 -m py_compile $(COMPARATOR)/matrix_builder.py
@echo "=== Compile: landscape launcher ==="
python3 -m py_compile $(LANDSCAPE)/launch_report.py
@echo "=== Compile: platform files ==="
@for f in $(ENGINE)/platforms/*.py; do python3 -m py_compile "$$f"; done
@echo "=== Compile: shell scripts ==="
bash -n setup.sh
bash -n install.sh
@echo "All compile checks passed."
# ── Stage 2: Unit Tests ──────────────────────────────────────────────────────
test:
$(VENV_PYTHON) -m pytest skills/orchestrator/engine/tests/ -v --tb=short
# ── Stage 3: Regression ──────────────────────────────────────────────────────
regression:
@echo "=== Regression: no domain strings in engine ==="
@! grep -ri --include="*.py" --exclude-dir=.venv --exclude-dir=__pycache__ "solution.research" $(ENGINE)/
@! grep -ri --include="*.py" --exclude-dir=.venv --exclude-dir=__pycache__ "devops" $(ENGINE)/
@! grep -r "_PROMPT_SIGS" $(ENGINE)/platforms/*.py
@echo "=== Regression: 7 platforms with check_rate_limit ==="
@test "$$(grep -l 'async def check_rate_limit' $(ENGINE)/platforms/*.py | grep -v base.py | wc -l | tr -d ' ')" = "7"
@echo "=== Regression: RATE_LIMITS config ==="
@python3 -c "\
import sys; sys.path.insert(0,'$(ENGINE)'); \
from config import RATE_LIMITS; \
assert len(RATE_LIMITS) == 7, f'Expected 7, got {len(RATE_LIMITS)}'; \
print('RATE_LIMITS: 7 platforms OK')"
@echo "=== Regression: CLI flags ==="
@python3 $(ENGINE)/orchestrator.py --help | grep -q "task-name"
@python3 $(ENGINE)/orchestrator.py --help | grep -q "tier"
@python3 $(ENGINE)/orchestrator.py --help | grep -q "budget"
@python3 $(ENGINE)/orchestrator.py --url x 2>&1 | grep -q "error"
@echo "=== Regression: budget command ==="
@python3 $(ENGINE)/orchestrator.py --prompt "x" --budget 2>&1 | grep -q "Rate Limit Budget"
@echo "All regression checks passed."
# ── Version ───────────────────────────────────────────────────────────────────
version-check:
@echo "=== Version sync check ==="
@bash scripts/version-stamp.sh --check
version-stamp:
@bash scripts/version-stamp.sh
# ── Combined ──────────────────────────────────────────────────────────────────
check: compile test regression version-check
@echo ""
@echo "All checks passed."
# ── Convenience ───────────────────────────────────────────────────────────────
budget-check:
python3 $(ENGINE)/orchestrator.py --prompt "x" --budget --tier free
@echo ""
python3 $(ENGINE)/orchestrator.py --prompt "x" --budget --tier paid
landscape-smoke:
python3 $(LANDSCAPE)/launch_report.py --report-dir test --report-file "Test.md" --no-browser
e2e-smoke:
python3 $(ENGINE)/orchestrator.py --prompt "What is 2+2?" --mode REGULAR --platforms claude_ai --task-name "smoke-test"