Files
dagx/Cargo.toml
swaits 5839b35979 test: add comprehensive testing infrastructure (fuzzing, proptest, mutation)
Implements dagx-11: Add comprehensive testing infrastructure including
fuzzing, property-based testing, and mutation testing configuration.

**Fuzzing Infrastructure:**
- Created fuzz/ directory with cargo-fuzz setup
- 4 fuzz targets covering different scenarios:
  - fuzz_dag_execution: Basic DAG execution with various patterns
  - fuzz_dependencies: Dependency management (linear, diamond, complex)
  - fuzz_type_safety: Type-safe output retrieval
  - fuzz_concurrent: Concurrent execution and thread safety
- Comprehensive README with usage instructions
- Integrated with justfile (fuzz, fuzz-all, fuzz-extended, fuzz-build)

**Property-Based Testing:**
- Added proptest dependency to Cargo.toml
- Created tests/property_tests.rs with 14 property tests:
  - Value preservation through DAG
  - Linear chain correctness
  - Fan-out pattern verification
  - Diamond pattern correctness
  - String, Vec, Option, Result handling
  - HashMap and custom struct preservation
  - DAG isolation
  - Concurrent execution scaling
- Integrated with justfile (proptest recipe)

**Mutation Testing:**
- Created .cargo-mutants.toml configuration
- Focused on critical functions:
  - DagRunner::run and ::get
  - TaskBuilder::depends_on
  - ExecutableNode::execute_with_listeners
  - ExtractFromListeners::extract
  - DepsTuple::to_node_ids
- Excluded low-value mutations (fmt, clone, default)
- Configured for nextest and parallel execution
- Already integrated via existing justfile mutants recipe

**Justfile Updates:**
- Added fuzzing section with 5 new recipes
- Added proptest recipe for property-based tests
- All recipes follow existing patterns and naming conventions

Similar setup to ../announcement project but tailored for DAG-specific testing.
2025-10-14 10:44:30 -06:00

54 lines
1.6 KiB
TOML

[workspace]
members = ["dagx-macros"]
[package]
name = "dagx"
version = "0.3.0"
edition = "2021"
rust-version = "1.81"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
description = "A minimal, type-safe, runtime-agnostic async DAG (Directed Acyclic Graph) executor with compile-time cycle prevention and true parallel execution"
repository = "https://github.com/swaits/dagx"
homepage = "https://github.com/swaits/dagx"
documentation = "https://docs.rs/dagx"
readme = "README.md"
keywords = ["dag", "async", "task", "parallel", "executor"]
categories = ["asynchronous", "concurrency", "data-structures"]
exclude = [".claude/", ".jj/", "dagx-spec.md"]
[features]
default = []
tracing = ["dep:tracing"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin)', 'cfg(tarpaulin_include)'] }
[dependencies]
announcement = "0.1.0"
futures = "0.3"
parking_lot = "0.12"
dagx-macros = { version = "0.3.0", path = "./dagx-macros" }
tracing = { version = "0.1", optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time", "sync"] }
async-std = { version = "1", features = ["attributes"] }
smol = "2"
criterion = "0.7"
# Property-based testing
proptest = "1"
# Quirky async runtimes for edge-case testing
async-executor = "1.13"
pollster = "0.4"
futures-executor = { version = "0.3", features = ["thread-pool"] }
# Comparison benchmarks
dagrs = { version = "0.5", default-features = false }
async-trait = "0.1"
# Tracing support for tests and examples
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
[[bench]]
name = "dagx_bench"
harness = false