Commit Graph
28 Commits
Author SHA1 Message Date
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
swaits 10af81ade7 test: comprehensive test improvements and infrastructure
This commit includes multiple test-related improvements from porting
parallel branch work and fixing test failures:

- Add justfile for development workflows (dagx-10)
  - Quick dev loop (fmt + clippy + test)
  - Pre-commit checks, pre-push validation, pre-release checks
  - Coverage, mutation testing, benchmarks, examples
  - Security audits, Miri, and more

- Port type mismatch tests for DagRunner::get() (dagx-13)
  - Test i32 to Vec<u8> mismatch
  - Test custom struct to HashMap mismatch
  - Test Vec<i32> to Vec<String> mismatch
  - Test Option<i32> to Option<String> mismatch

- Port TaskBuilder conversion tests (dagx-14)
  - Test conversion with multiple tasks preserves IDs
  - Test conversion with stateful tasks
  - Test conversion with complex output types (Vec, Option)

- Add custom_types.rs example (dagx-15)
  - Demonstrates custom User type with fan-out pattern
  - Shows Arc wrapping is transparent to users
  - Comprehensive documentation

- Fix all failing tests (dagx-16)
  - Remove incompatible task_fn tests from task/tests.rs
    (task_fn requires Arc-wrapped types, tests used raw types)
  - Fix listener type downcasts in node/tests.rs
    (Listener<Arc<i32>> not Listener<i32>)
  - Add #[allow(dead_code)] to unused test structs

- Cleanup unnecessary #[allow(dead_code)] in deps/tests.rs (dagx-9)

All 60 tests now pass.
2025-10-14 10:12:07 -06:00
swaits 0c303ed9e4 chore: add justfile with initial jobs 2025-10-14 10:11:50 -06:00
swaits 04d1c13122 WIP: perf: test regression, needs Arc<T> 2025-10-14 09:48:14 -06:00
swaits 89fbd26a47 chore: remove Cargo.lock (library crates should not commit lockfiles)
Library crates should not commit Cargo.lock files. Only application
crates need Cargo.lock for reproducible builds.

This ensures library users control their own dependency resolution
rather than being locked to specific versions from the library's
lock file.

Changes:
- Add Cargo.lock to .gitignore to prevent future commits
- Delete Cargo.lock file from repository (37KB)
2025-10-14 09:48:07 -06:00
swaits 6de4d43db1 WIP: switch to announcement, remove extract input mess 2025-10-14 09:01:28 -06:00
swaits 82cbf15b85 docs: clean up, split up, restructure README.md v0.3.0 2025-10-08 16:01:27 -06:00
swaits 748e3f65c4 perf: optimization hints (inline, cold, etc) 2025-10-08 15:50:02 -06:00
swaits e3f51308a0 chore: bump crate to 0.3.0, update CHANGELOG 2025-10-08 14:52:45 -06:00
swaits bec2f9e4c9 fix: lint, disable wonky timing test on macos 2025-10-08 14:52:32 -06:00
swaits 802e584646 refactor: remove cycle checking becuase API prevents cycles 2025-10-08 14:28:54 -06:00
swaits 683579a18b test: increase coverage, improve test matrices for CI 2025-10-08 14:23:19 -06:00
swaits 02eac133bd fix: force threads on arc test (fixes MacOS CI failure) 2025-10-08 12:20:04 -07:00
swaits 47620b6702 fix: clippy lint due to tracing-only code 2025-10-08 12:19:27 -07:00
swaits 9290eccd86 docs: add TOC to ridiculously long README 2025-10-07 21:37:10 -07:00
swaits 4e891ebd5a chore: bump crate to 0.2.3, update CHANGELOG v0.2.3 2025-10-07 21:30:05 -07:00
swaits 5524b2121b docs: clean up examples/_parallel_computation.rs 2025-10-07 21:23:27 -07:00
swaits ec94ade329 chore: add logging under tracing feature 2025-10-07 21:16:04 -07:00
swaits ac848c6608 chore: bump crate to 0.2.2, update CHANGELOG v0.2.2 2025-10-07 20:30:19 -07:00
swaits 0a91889022 chore: make release checker verify docs match crate version 2025-10-07 20:24:00 -07:00
swaits ba32767b94 chore: bump crate to 0.2.1, update CHANGELOG v0.2.1 2025-10-07 19:58:19 -07:00
swaits 504347a46a fix: force tokio:test("multi_thread") so tests pass on macOS 2025-10-07 19:53:05 -07:00
swaits aa604e617f chore: bump crate to 0.2.0, update CHANGELOG v0.2.0 2025-10-07 19:39:24 -07:00
swaits 608251618a chore: bump MSRV to 1.81.0 (due to dependencies) 2025-10-07 17:32:44 -07:00
swaits 400c01d73c test: increase coverage to 93% 2025-10-07 17:29:08 -07:00
swaits 98b8bcfd6e chore: remove inappropriate tests from tarpaulin runs 2025-10-07 16:56:35 -07:00
swaits 6b2ca6ba7e chore: fix cargo-audit GH action 2025-10-07 16:51:13 -07:00
swaits 7412287ee4 feat: dagrunner, initial version v0.1.0 2025-10-07 16:31:03 -07:00