DocsInternals
Developer Workflow
On this page
We target the dated Rust nightly pinned by
. Agents should offload build, test, lint, and snapshot
commands with rch.
# Format & Lint
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo fmt --check
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo clippy --all-targets -- -D warnings
# Build & Test
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo build --release
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo test
# Run End-to-End Tests
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo test --test e2e_index_tui
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-dev-target cargo test --test install_scripts
Snapshot Baseline Workflow (FrankenTUI)#
Use targeted snapshot runs; do not blindly bless everything:
# Verify current baselines
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-snapshot-target cargo test snapshot_baseline_ -- --nocapture
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-snapshot-target cargo test snapshot_search_surface_ -- --nocapture
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-snapshot-target cargo test --test ftui_harness_snapshots -- --nocapture
# Regenerate only the suite you intentionally changed
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-snapshot-target BLESS=1 cargo test snapshot_baseline_ -- --nocapture
The full regeneration/review protocol (required reviewer checklist, behavioral guard tests,
and quality gates) lives in docs/planning/TESTING.md under
Snapshot Baseline Regeneration & Review (FrankenTUI).
HTML Export E2E Logging#
Playwright E2E runs emit a setup metadata file at tests/e2e/exports/setup-metadata.json and
export its path as TEST_EXPORT_SETUP_LOG in tests/e2e/.env.test. On failures, tests attach
per-test browser logs (console/pageerror/requestfailed). Set E2E_LOG_ALWAYS=1 to attach logs
for every test. These paths are generated run artifacts and are intentionally ignored; durable
logging schema documentation lives in docs/reference/E2E_LOGGING_SCHEMA.md.
Release Build Optimizations#
The release profile is aggressively optimized for binary size and performance:
[profile.release]
lto = true # Link-time optimization across all crates
codegen-units = 1 # Single codegen unit for better optimization
strip = true # Remove debug symbols from binary
panic = "abort" # Smaller panic handling (no unwinding)
opt-level = 3 # Maximum runtime optimization
Trade-offs:
- Build time is significantly longer (~3-5x)
- LTO and a single codegen unit prioritize runtime optimization at the cost of build time
- No stack traces on panic (use debug builds for development)
Verification and Release Pipeline#
This repository has no GitHub Actions: .github/workflows/ stays empty, scripts/gate.sh refuses to run on a tree that carries a workflow file, and tests/no_github_actions.rs fails on one. Verification runs on the rch build fleet through scripts/gate.sh, in one fleet admission. Its stages are source identity and freshness, cargo fmt , clippy , the lib build and tests, the selected integration targets, the cass binary's own tests, the golden-file contracts and a UBS scan of the changed files. Each stage prints a STAGE=<name> EXIT=<code> receipt line, and commits and bead closures cite those lines. , , and narrow a run.
Cross-platform builds and releases run through dsr (dsr health all, dsr build, dsr release, dsr fallback); native Windows and macOS checks run on its build hosts. No coverage report is published; generate one locally:
# Generate coverage through rch
# Ensure cargo-llvm-cov is already installed before agent-run gates.
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-coverage-target cargo llvm-cov --all-features --workspace --text
# Run specific e2e tests
rch exec -- env CARGO_TARGET_DIR=/data/tmp/cass-e2e-target cargo test --test e2e_filters -- --test-threads=1