Contributing & Testing
Lumiere aims for beauty by simplicity: clear primitives, direct control flow, zero unsafe code, and fast, durable tests.
Local development workflow
# Check formatting (configured in rustfmt.toml)
cargo fmt --all -- --check
# Lint with warnings denied across both feature sets
cargo clippy --all-targets -- -D warnings
cargo clippy --no-default-features --all-targets -- -D warnings
# Run the full test suite (Git + Jujutsu, and Git-only)
cargo test
cargo test --no-default-features
# Build an optimized release binary (LTO + single codegen unit + stripped symbols)
cargo build --release
Testing philosophy
Lumiere's tests focus on durable user-visible behavior and real invariants rather than internal implementation details:
- Isolated temporary repositories: VCS, diff loading, watcher, workspace, and thread-store tests use
tempfile::TempDirand pass explicit paths instead of mutating global working directories. - Headless TUI rendering with
ratatui::backend::TestBackend: Diff rendering (side-by-side, added/deleted single-panel, binary, hunks-only folding, inline thread overlays, stacked headers, narrow footers, and Thread View modals) is tested directly against rendered terminal cell buffers. - Headless event-loop tests:
App::handle_eventreturnsLoopActionand operates cleanly without a TTY, letting tests drive multi-step keystroke and mouse workflows (commenting, queueing, global search jumping into hidden lines, asyncAgentWorkerpicker updates, and scroll coalescing). - Concurrency & UTF-8 regression coverage: Multi-threaded
ThreadStorelock/rename stress tests, Unicode char-boundary tests for search/selection/truncation, andserdeGraphQL fixture tests protect subtle edge cases. - Jujutsu integration tests: Tests requiring the external
jjbinary automatically skip whenjjis not installed inPATH.
Previewing the documentation website
This documentation site is built with mdBook.
# Install mdBook once
cargo install mdbook
# Serve locally with live reload
mdbook serve docs --open
# Build static HTML into docs/book/
mdbook build docs
Merging changes to docs/** on main automatically builds and deploys the site to GitHub Pages via .github/workflows/docs.yml.
Continuous Integration & Releases
.github/workflows/ci.ymlrunscargo fmt --check,cargo clippy -- -D warnings(default and--no-default-features),cargo teston bothubuntu-latestandmacos-latest, and an MSRV check on Rust1.89..github/workflows/dependency-review.ymlruns GitHub Dependency Review on pull requests (failing on moderate or higher advisories)..github/workflows/security-audit.ymlruns a daily scheduled RustSec audit (cargo-audit) across all dependencies inCargo.lockand opens issues on new advisories..github/workflows/lint-pr-title.ymlenforces Conventional Commit PR titles so Release Drafter can classify changes automatically..github/workflows/docs.ymlbuilds the mdBook site on PRs and deploys to GitHub Pages onmain..github/workflows/release-drafter.yml(configured in.github/release-drafter.yml) auto-labels PRs (breaking,feature,fix,chore) and maintains a draft GitHub Release onmainwith0.xsemantic versioning (breakingandfeatbump minor;fixandchorebump patch)..github/workflows/release.ymltriggers when a GitHub Release is published (or viaworkflow_dispatchwith a release tag), builds Linux (x86_64) and macOS (aarch64,x86_64) binaries withLUMIERE_VERSIONstamped from the tag, and uploads checksummed tarballs to that release.