This repository was archived by the owner on Jul 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
92 lines (76 loc) · 2.92 KB
/
Copy pathMakefile
File metadata and controls
92 lines (76 loc) · 2.92 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
# Olympus — canonical developer commands.
#
# This is a Rust workspace (control plane) + a Vite/React UI under ui/.
# The single source of truth for "is the tree green?" is `make verify`.
SHELL := /bin/bash
.PHONY: verify verify-rust verify-ui test lint fmt build run e2e e2e-desktop e2e-live e2e-prod deploy deploy-hall deploy-envoy
## verify — run ALL canonical gates (Rust + UI). The harness's go-to command.
verify: verify-rust verify-ui
@echo "ALL CANONICAL GATES GREEN"
## verify-rust — cargo test + clippy (-D warnings) + fmt --check
verify-rust:
cargo test --workspace
cargo clippy --all-targets -- -D warnings
cargo fmt --check
## verify-ui — typecheck + build + Maestro web e2e (fast inner loop)
verify-ui:
cd ui && bun run typecheck
cd ui && bun run build
cd ui && bun run test:e2e
## test — Rust tests only (fast inner loop)
test:
cargo test --workspace
## lint — clippy with warnings as errors
lint:
cargo clippy --all-targets -- -D warnings
## fmt — apply rustfmt
fmt:
cargo fmt
## build — release binary
build:
cargo build --release
## run — start the control plane (imports state.db, serves API on :8787)
run:
cargo run --release
## e2e — Maestro web e2e with evidence bundle (screenshots + optional videos)
e2e:
cd ui && bun run test:e2e
cd ui && bash scripts/evidence-bundle.sh
## e2e-desktop — compatibility alias for the Maestro Chromium web tier
e2e-desktop:
cd ui && bun run test:e2e
## e2e-live — smoke tests against the REAL control plane (spends tokens)
e2e-live:
cd ui && bun run test:e2e:live
## e2e-prod — prod-parity: static UI served by the control plane itself
## (same origin cloudflared sees). Requires olympus.service running.
e2e-prod:
cd ui && bun run test:e2e:prod
## deploy — install both hall + envoy binaries (symlink flip, no restart).
deploy:
bash scripts/deploy.sh both
## deploy-hall — build hall → symlink flip → restart olympus-hall.service.
## Envoys survive (ADR §5 Hall deploy story); they buffer through downtime.
deploy-hall:
bash scripts/deploy.sh hall
systemctl --user restart olympus-hall
@echo "Hall restarted. Envoys will re-attach on their next reconnect."
## deploy-envoy N — build envoy → symlink flip → start olympus-envoy@N →
## poll /api/nodes until the new envoy is online → drain the old envoy if
## one exists. Usage: make deploy-envoy N=2
deploy-envoy:
@if [ -z "$$N" ]; then echo "Usage: make deploy-envoy N=2" >&2; exit 1; fi
bash scripts/deploy.sh envoy
systemctl --user start olympus-envoy@$$N
@echo "Started olympus-envoy@$$N, polling /api/nodes until online…"
@TOKEN=$$(cat ~/.olympus/token); \
for i in $$(seq 1 30); do \
online=$$(curl -sf -H "Authorization: Bearer $${TOKEN}" \
http://127.0.0.1:8799/api/nodes \
| grep -c "envoy-$$N" || true); \
if [ "$$online" -gt 0 ]; then \
echo "envoy-$$N is online"; exit 0; \
fi; \
sleep 1; \
done; \
echo "ERROR: envoy-$$N did not come online in 30s" >&2; exit 1