-
Notifications
You must be signed in to change notification settings - Fork 444
Expand file tree
/
Copy pathMakefile
More file actions
303 lines (261 loc) · 13.1 KB
/
Copy pathMakefile
File metadata and controls
303 lines (261 loc) · 13.1 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# Dora QA targets
#
# Local-first quality gates. Same scripts run in CI.
# See docs/plan-agentic-qa-strategy.md for the full strategy.
#
# The ladder (increasing thoroughness, increasing runtime):
#
# make qa-fast ~1 min pre-commit sanity
# make qa-full ~5-10 min pre-push
# make qa-deep ~15 min target Tier 1 gate, stronger than today's CI
# (adds coverage, adversarial, mutants, semver -
# kept laptop-only, see strategy doc §5)
# make qa-nightly ~3-4 hours Full parity with .github/workflows/nightly.yml
# (qa-deep + proptest@1000 + miri + example-smoke
# + ci-nightly-jobs). After the #1716 rebalance,
# nightly.yml has 27 test jobs (re-counted
# in #2999): example-smoke
# covers 4 (smoke-suite/log-sinks/service-action/
# streaming); scripts/qa/ci-nightly-jobs.sh drives
# 20 more with platform-aware dispatch
# (record-replay, cluster-smoke, cluster-e2e [Linux],
# cluster-record-replay [Linux],
# topic-and-top, cpu-affinity [Linux], redb-backend,
# daemon-reconnect [Linux], state-reconstruction,
# multi-daemon-late-subscriber [Linux],
# test-cross-platform, examples, cli-tests,
# bench-example, cross-check, ros2-bridge [Linux+ROS2],
# ros2-zenoh-humble, ros2-zenoh-kilted,
# msrv, kani-proofs [skipped if Kani absent]).
# Green local run on platform X predicts
# green CI nightly for platform X's jobs.
# make qa-release-gate Tier 3 automatable parts (deep + semver;
# audit/dogfood are human)
# make qa-mutation-audit ~10-18 hrs full-repo cargo-mutants; deliberate
# test-quality audit, NOT every nightly
#
# Orthogonal to the ladder:
#
# make qa-examples ~15-20 min run all smoke-eligible example
# dataflows end-to-end (wraps
# scripts/smoke-all.sh). The script
# skips examples that need CUDA, ROS2,
# webcam, multi-machine deploy, C/C++
# toolchains, or interactive CLI --
# run `scripts/smoke-all.sh -h` to see
# the SKIP list. Not part of qa-*
# ladder by design: the ladder
# excludes dora-examples tests to
# keep per-commit budgets tight.
#
# make qa-test-python ~1 min warm unit tests of the three PyO3 crates,
# which every other qa-* target
# excludes. Needs a Python >= 3.11
# with a shared libpython; run it
# after touching apis/python/* or
# libraries/extensions/ros2-bridge/
# python. CI runs the same command in
# ci.yml's contract-tests job.
#
# `make qa-tier1` is a back-compat alias for `make qa-deep`.
.PHONY: qa qa-fast qa-full qa-deep qa-tier1 qa-nightly qa-release-gate qa-mutation-audit \
qa-examples qa-cluster-e2e qa-cluster-record-replay qa-docker-slim \
ros2-zenoh-humble ros2-zenoh-kilted \
qa-fmt qa-audit qa-unwrap qa-secret-files qa-publish-graph \
qa-package-includes qa-lockfile \
qa-ci-reporting qa-ci-reporting-selftest qa-clippy qa-test qa-test-python \
qa-test-python-node qa-coverage qa-mutants qa-semver qa-breaking qa-breaking-update \
qa-adversarial qa-kani qa-pgo qa-install qa-pgo-install qa-kani-install \
qa-verify-release
qa: qa-fast
qa-fast:
@scripts/qa/all.sh --fast
qa-full:
@scripts/qa/all.sh --full
qa-deep:
@scripts/qa/all.sh --deep
# Back-compat alias. Prefer `make qa-deep` in new docs/scripts.
qa-tier1: qa-deep
qa-nightly:
@scripts/qa/all.sh --nightly
ros2-zenoh-humble:
@scripts/ros2-zenoh-interop.sh humble all
ros2-zenoh-kilted:
@scripts/ros2-zenoh-interop.sh kilted all
qa-release-gate:
@scripts/qa/all.sh --release-gate
qa-mutation-audit:
@scripts/qa/all.sh --mutation-audit
# Run all smoke-eligible example dataflows end-to-end via
# scripts/smoke-all.sh. Skips examples requiring CUDA, ROS2, webcam,
# multi-machine deploy, C/C++ toolchains, or interactive CLI.
# Budget ~15-20 min. Pass flags through, e.g.
# make qa-examples ARGS="--rust-only"
# make qa-examples ARGS="-v" # stream dora output live
qa-examples:
@scripts/smoke-all.sh $(ARGS)
# Build the `dora-slim` container image and run a dataflow inside it, the
# same two steps `.github/workflows/docker-image.yml` gates on. Needs a working
# Docker daemon; deliberately NOT in the qa-fast/full/deep ladder, since it
# costs minutes and a daemon the ladder does not assume. Run it when you touch
# `docker/`.
qa-docker-slim:
@docker build docker/slim -t dora-slim:local
@docker run --rm -v "$$PWD/docker/slim/smoke.sh:/smoke.sh:ro" dora-slim:local bash /smoke.sh
# Real-sshd end-to-end test of `dora cluster up/status/down`. Linux-only.
# Hard-fails if openssh-server is not installed (install via
# `sudo apt-get install -y openssh-server`). Subset of qa-nightly; this
# target is here so developers can run just this job locally without
# invoking the full nightly suite.
qa-cluster-e2e:
@scripts/qa/ci-nightly-jobs.sh cluster-e2e
# Stitches cluster-e2e + record-replay (#2013): record a dataflow spread
# across a 3-daemon SSH cluster, replay it locally, and validate the replayed
# state against the seed(42) baseline. Linux-only; same openssh-server
# requirement as qa-cluster-e2e. Subset of qa-nightly, broken out for local
# runs.
qa-cluster-record-replay:
@scripts/qa/ci-nightly-jobs.sh cluster-record-replay
# Individual gates
qa-fmt:
@cargo fmt --all -- --check
qa-audit:
@scripts/qa/audit.sh
qa-unwrap:
@scripts/qa/unwrap-budget.sh
# Credential-file gate (#2194): fail if git tracks a file whose name says
# it holds a secret. .gitignore did not stop `.adora-token` reaching the
# public repo, because it only covers files git is not already tracking.
qa-secret-files:
@scripts/qa/secret-files.sh
# Manifest-only crates.io publish-graph gate (#3304): no published crate
# may depend on a `publish = false` one, and release.yml's ordered list
# must name every dependency before its dependents.
qa-publish-graph:
@scripts/qa/publish-graph.sh
# Build-time file inclusion gate (#3400): every `include_str!` /
# `include_bytes!` target of a publishable crate must be a git-tracked
# file inside that crate, or the published `.crate` will not have it.
qa-package-includes:
@scripts/qa/package-includes.sh
# Cargo.lock freshness gate (#3512): the committed lock must already
# satisfy every workspace manifest. Plain cargo commands rewrite the lock
# in place, so a stale entry is green locally and only surfaces 3-4 hours
# later in the nightly's --locked builds (`msrv`, cluster `cargo install`).
qa-lockfile:
@scripts/qa/lockfile.sh
# Structural check on nightly.yml failure reporting. Parses the workflow
# only -- runs no nightly job, takes well under a second.
qa-ci-reporting:
@scripts/qa/ci-nightly-reporting.sh
# The gate's own tests: feed known-broken workflows through the real script
# and assert it goes red. A structural check that only ever prints OK is
# indistinguishable from one that stopped parsing.
qa-ci-reporting-selftest:
@python3 scripts/qa/tests/test_ci_nightly_reporting.py
qa-clippy:
@cargo clippy --all --all-targets \
--exclude dora-node-api-python \
--exclude dora-operator-api-python \
--exclude dora-ros2-bridge-python \
-- -D warnings
qa-test:
@cargo test --all \
--exclude dora-node-api-python \
--exclude dora-operator-api-python \
--exclude dora-ros2-bridge-python \
--exclude dora-runtime-python \
--exclude dora-cli-api-python \
--exclude dora-examples
# The unit tests of the PyO3 crates `qa-test` excludes. Kept a separate
# target, not folded into `qa-test`: cargo builds these crates without
# `pyo3/extension-module` (unlike the maturin wheel), so the test binaries
# link libpython directly and need an interpreter >= 3.11 with a shared
# library — a machine set up only for Rust work would start failing the
# everyday gate. CI runs this same target in ci.yml's `contract-tests` job,
# which sets Python up explicitly.
#
# `dora-runtime-python` is the operator runtime's Python backend. Its tests
# cover the cross-language arms of the runtime split — above all that a
# shared-library operator reaching the Python runtime is *delegated* to the
# shared-lib backend rather than rejected, which is what keeps native
# operators working under an embedded-Python daemon.
qa-test-python:
@cargo test --lib \
-p dora-cli-api-python \
-p dora-node-api-python \
-p dora-operator-api-python \
-p dora-ros2-bridge-python \
-p dora-runtime-python
# Python-level unit tests of the `dora` package under apis/python/node/tests/
# (the `dora` compat shim, the `dora.builder` API, and `dora.testing.MockNode`).
# These exercise the *installed* package, so they need `dora-rs` importable —
# run inside a venv that has `uv pip install -e apis/python/node` (plus pytest).
# CI runs this in ci.yml's `contract-tests` job, which sets that venv up (#3305).
qa-test-python-node:
@python -m pytest apis/python/node/tests/
qa-coverage:
@scripts/qa/coverage.sh
qa-mutants:
@scripts/qa/mutants.sh
qa-semver:
@scripts/qa/semver.sh
# The dora 1.x compatibility gate: every surface the 1.0 guarantee freezes,
# checked against the last released tag (docs/api-rust.md, "Stability scope
# at 1.0"). `ARGS="--fast"` drops to the no-compile checks (seconds) -- that
# subset is what PR CI runs and what `make qa-fast` includes; the default
# adds cargo-semver-checks and the snapshot-freshness rebuild.
#
# make qa-breaking
# make qa-breaking ARGS="--fast"
# make qa-breaking ARGS="--baseline v1.0.0"
qa-breaking:
@scripts/qa/breaking-changes.sh $(ARGS)
# Re-record the generated inputs the gate diffs: the `dora` command snapshot
# and the JSON schemas. Run this when a PR *adds* to either surface, and
# commit the result -- that diff is how the addition gets reviewed.
qa-breaking-update:
@scripts/qa/breaking-changes.sh --update
# Check that a published release is complete: every crate on release.yml's
# publish list is on crates.io, both wheels are on PyPI with the full
# platform matrix and an sdist, and the GitHub Release carries the CLI
# binaries plus the 8 C/C++ archives. release.yml runs this as its last job;
# run it by hand to audit an older tag. Pass VERSION=<x.y.z>.
#
# This reads back a *published* release. For the static publish-graph rules
# (list vs. manifests, ordering), see `make qa-publish-graph` — that one runs
# in PR CI and needs no network.
qa-verify-release:
@test -n "$(VERSION)" || { echo "usage: make qa-verify-release VERSION=1.0.0-rc.5"; exit 2; }
@python3 scripts/release/verify-release.py --version "$(VERSION)" $(ARGS)
# Adversarial LLM review of current diff (requires codex or claude CLI)
qa-adversarial:
@scripts/qa/adversarial.sh
# Formal verification: run the #[kani::proof] harnesses (cfg(kani)-gated,
# zero impact on normal builds). A passing proof covers every input in the
# harness state space, not just sampled values. Budget ~5-10 min cold,
# <1 min warm. Run when touching files that contain proofs (see
# docs/formal-verification.md) and in pre-release gating; not part of the
# per-commit qa-fast loop. Nightly CI runs the same proofs (kani-proofs
# job). Install via `make qa-kani-install`.
qa-kani:
@scripts/qa/kani.sh
# Profile-Guided Optimization measurement. Build dora-cli with cargo-pgo
# (instrument -> train on examples/benchmark -> optimize), then run the
# benchmark twice (baseline vs PGO) and print a side-by-side comparison.
# Budget ~30-40 min wall time, ~5-10 GB extra target/ artifacts. PGO results
# don't transfer across OS/arch — run this on your target platform to find
# out if PGO helps. See dora-rs/dora#331 for the methodology and the
# macOS-arm64 baseline data point (+25% throughput geomean).
qa-pgo:
@scripts/qa/pgo.sh
# One-shot tool installation
qa-install:
cargo install cargo-audit cargo-deny cargo-llvm-cov cargo-mutants cargo-semver-checks
rustup component add llvm-tools-preview
qa-pgo-install:
cargo install cargo-pgo
rustup component add llvm-tools-preview
qa-kani-install:
cargo install kani-verifier --locked
cargo kani setup