M0.11: ROADMAP, CONTRIBUTING, docs/architecture and docs/testing

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Brandon ThomasandClaude Opus 5.5 committed 2026-10-01 23:07:08 -04:00
1 parent 1e8768ad18
commit c9f6f9e3be
5 files changed
+201 -1

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
# Testing
```sh
cargo test --workspace # everything
cargo xtask ci # fmt, clippy -D warnings, tests, layers, assets, wasm
```
## What the tests cover
- **Engine commands** (`crates/engine/src/tests*.rs`): every command family, including undo and
redo, and that every menu entry resolves to a registered command.
- **Rendering** (`crates/render`): pixel checks on small compositions, for blend modes, masks,
mattes, time remapping, 3D projection, lighting and shadows. Fast paths (the layer cache, the
affine compositor, blurs, motion blur accumulation) are checked against their reference
implementations.
- **Effects** (`crates/effects`): each effect has a determinism test and at least one behaviour
test (identity at neutral settings, known pixel results, or simulations giving the same frame
whether you seek straight to it or play up to it). A registry-wide test checks that effects
which read the clock are declared time-dependent.
- **Export** (`crates/export/tests`): every format is encoded and decoded back, checking frame
count, size and pixels. When `ffmpeg`/`ffprobe` are installed they are used as an outside
check; they are never linked or shipped.
- **Automation** (`crates/automation`, `apps/effectcraft-cli/tests`): MCP protocol round trips and
the command-line tool's JSON output.
- **Interface** (`crates/ui-egui`): headless egui_kittest tests for panels and dialogs.
## Looking at the interface without a window
```sh
cargo run -p effectcraft-ui-egui --example snapshot -- --out ui.png \
--step '{"method":"engine.execute","params":{"command":"layer.select","params":{"layers":["#2"]}}}'
```
Each `--step` is a control-channel request; `{"method":"snap","params":{"path":"x.png"}}` writes an
intermediate image.
## Benchmarks
```sh
cargo run --release -p effectcraft-cli -- bench --n 10 --play 30
```
prints per-layer and per-effect timings for one frame, and playback timings with and without the
layer cache.