-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
153 lines (119 loc) · 7.69 KB
/
Makefile
File metadata and controls
153 lines (119 loc) · 7.69 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
.PHONY: lint test typecheck compile quality smoke setup setup-dev run demo-autonomy report bench courtroom baselines longevity longevity-24h chaos governance-lint security enterprise-gate enterprise-collect enterprise-strict production-gate provenance decisive proof-bundle behavioral-proof activation-audit source-hygiene clean-bench
PYTHON ?= python
RUFF_SURFACE_TARGETS ?= core interface llm security senses skills executors infrastructure aura_main.py tools tests
RUFF_CRITICAL_TARGETS ?= core interface llm security senses skills executors infrastructure aura_main.py
RUFF_CRITICAL_SELECT ?= F821,F822,F823,F601
RUFF_TARGETS ?= core/apply_response_patches.py core/brain/llm/context_assembler.py core/brain/llm/context_limit.py core/cognitive_integration_layer.py core/safe_mode.py core/coordinators/metabolic_coordinator.py core/evolution/persona_evolver.py core/orchestrator/mixins/autonomy.py core/orchestrator/mixins/context_streaming.py core/orchestrator/mixins/learning_evolution.py core/resilience/dream_cycle.py tests/test_response_patch_retirement.py tests/test_context_assembler_runtime.py tests/test_context_limit_runtime.py tests/test_cognitive_pipeline_2026.py tests/test_safe_mode_runtime.py tests/test_consciousness_patch_retirement.py
MYPY_TARGETS ?= core/apply_response_patches.py core/brain/llm/context_limit.py core/safe_mode.py core/runtime/atomic_writer.py core/consciousness/continuous_experience.py core/environment/experience_replay.py core/memory/procedural/store.py core/unity/runtime.py tools/aura_production_readiness_gate.py tools/build_provenance.py
MYPY_FLAGS ?= --follow-imports=skip --explicit-package-bases
PYTEST_TARGETS ?= tests -q
SMOKE_TEST_TARGETS ?= tests/test_response_contract.py tests/test_chat_format.py tests/test_effect_closure.py tests/test_local_server_client.py tests/test_cognitive_pipeline_2026.py tests/test_safe_mode_runtime.py tests/test_response_patch_retirement.py tests/test_context_assembler_runtime.py tests/test_context_limit_runtime.py tests/test_consciousness_patch_retirement.py -q
ENTERPRISE_BASELINE ?= config/aura_enterprise_gate_baseline.json
# ─── Reproducible build (one-command path for external reviewers) ────────
setup:
@echo "🔧 Setup: creating virtualenv (.venv) and installing requirements"
@if [ ! -d .venv ]; then $(PYTHON) -m venv .venv; fi
@. .venv/bin/activate; pip install -U pip wheel; pip install -r requirements/core.txt 2>/dev/null || pip install -r requirements.txt 2>/dev/null || true
@. .venv/bin/activate; if [ -f requirements/dev.txt ]; then pip install -r requirements/dev.txt; else pip install -e ".[dev]"; fi
@echo "✅ Setup complete"
setup-dev:
@echo "🔧 Installing Aura development quality tools..."
@. .venv/bin/activate; if [ -f requirements/dev.txt ]; then pip install -r requirements/dev.txt; else pip install -e ".[dev]"; fi
@echo "✅ Development tools installed"
run:
@echo "▶️ Launching Aura (foreground)..."
@$(PYTHON) aura_main.py --desktop
demo-autonomy:
@echo "🤖 Running autonomy demo (60s soak)..."
@$(PYTHON) -m tools.longevity.run_gauntlet --profile 24h_no_user --tick-s 5 || true
report:
@echo "📊 Generating bench + courtroom + baseline reports..."
@$(PYTHON) -c "import asyncio; from aura_bench.runner import run_all, write_report; r=asyncio.run(run_all()); write_report(r); print('bench done')"
@$(PYTHON) -m aura_bench.courtroom.courtroom || true
@$(PYTHON) -m aura_bench.baselines.runner || true
@echo "✅ Reports written to ~/.aura/data/bench/ and aura_bench/courtroom/report.md"
# ─── Compile / lint / test gates ─────────────────────────────────────────
compile:
@echo "🔍 Compiling all Python files..."
@$(PYTHON) -m compileall -q core tests
@echo "✅ All files compile"
lint:
@echo "🧹 Running ruff..."
@$(PYTHON) -m ruff check $(RUFF_SURFACE_TARGETS) --select E9
@$(PYTHON) -m ruff check $(RUFF_CRITICAL_TARGETS) --select $(RUFF_CRITICAL_SELECT)
@$(PYTHON) -m ruff check $(RUFF_TARGETS)
@echo "✅ Ruff passed"
source-hygiene:
@echo "🧼 Checking source snapshot hygiene..."
@tracked="$$(git ls-files | grep -E '(^|/)__pycache__/|\.py[cod]$$|\$$py\.class$$|(^|/)\.(pytest|mypy|ruff)_cache/' || true)"; \
if [ -n "$$tracked" ]; then \
echo "Generated cache artifacts are tracked:"; \
echo "$$tracked"; \
exit 1; \
fi
@echo "✅ Source snapshot hygiene passed"
governance-lint:
@echo "🛡 Running governance lint..."
@$(PYTHON) tools/lint_governance.py
security:
@echo "🔐 Running local security scan..."
@$(PYTHON) tools/security_scan.py
enterprise-gate:
@echo "🏢 Running enterprise static ratchet gate..."
@AURA_TEST_MODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 $(PYTHON) tools/aura_enterprise_gate.py --root . --baseline $(ENTERPRISE_BASELINE) --fail-on-regression --skip-pytest-collect --out /tmp/aura_enterprise_gate.json
@echo "✅ Enterprise gate passed; report written to /tmp/aura_enterprise_gate.json"
enterprise-collect:
@echo "🏢 Running enterprise pytest collection gate..."
@AURA_TEST_MODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 $(PYTHON) tools/aura_enterprise_gate.py --root . --baseline $(ENTERPRISE_BASELINE) --fail-on-regression --skip-compile --out /tmp/aura_enterprise_collect_gate.json
@echo "✅ Enterprise collection gate passed; report written to /tmp/aura_enterprise_collect_gate.json"
enterprise-strict:
@echo "🏢 Running strict enterprise certification gate..."
@AURA_TEST_MODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 $(PYTHON) tools/aura_enterprise_gate.py --root . --strict
production-gate:
@echo "🚦 Running production readiness contract..."
@AURA_TEST_MODE=1 $(PYTHON) tools/aura_production_readiness_gate.py --out /tmp/aura_production_readiness.json
@echo "✅ Production readiness contract passed; report written to /tmp/aura_production_readiness.json"
provenance:
@echo "📦 Generating SBOM and release provenance..."
@$(PYTHON) tools/build_provenance.py --output-dir artifacts/provenance
@echo "✅ Provenance written to artifacts/provenance"
activation-audit:
@echo "🧭 Auditing active Aura loops..."
@$(PYTHON) tools/activation_audit.py --output artifacts/activation_report.json
test:
@echo "🧪 Running tests..."
@$(PYTHON) -m pytest $(PYTEST_TARGETS)
@echo "✅ Tests passed"
typecheck:
@echo "📝 Running typechecker..."
@$(PYTHON) -m mypy $(MYPY_FLAGS) $(MYPY_TARGETS)
@echo "✅ Typecheck passed"
smoke:
@echo "💨 Running smoke suite..."
@$(PYTHON) -m pytest $(SMOKE_TEST_TARGETS)
@echo "✅ Smoke suite passed"
quality: source-hygiene enterprise-gate enterprise-collect production-gate compile lint governance-lint security typecheck smoke
@echo "🏁 Quality gates passed"
decisive:
@echo "🏁 Generating decisive readiness bundle..."
@$(PYTHON) tools/proof_bundle.py --output-dir artifacts/proof_bundle/latest
behavioral-proof:
@echo "🧪 Running behavioral proof smoke gate..."
@$(PYTHON) tools/behavioral_proof_smoke.py --output artifacts/behavioral_proof/latest.json
proof-bundle: decisive behavioral-proof
@echo "📦 Proof bundle written to artifacts/proof_bundle/latest"
# ─── Bench / chaos / longevity ────────────────────────────────────────────
bench:
@$(PYTHON) -c "import asyncio; from aura_bench.runner import run_all, write_report; r=asyncio.run(run_all()); write_report(r); print('bench done')"
courtroom:
@$(PYTHON) -m aura_bench.courtroom.courtroom
baselines:
@$(PYTHON) -m aura_bench.baselines.runner
longevity:
@$(PYTHON) -m tools.longevity.run_gauntlet --profile 24h_no_user
longevity-24h: longevity
chaos:
@$(PYTHON) -m tools.chaos.injector --kind random
clean-bench:
@rm -rf ~/.aura/data/bench
@echo "🧹 cleaned ~/.aura/data/bench"