Skip to content

Extend testing skill with Miri, fuzzing, and sanitizers #67

@AlexMikhalev

Description

@AlexMikhalev

Parent Epic: #62

What

Add advanced verification tool guidance to the testing SKILL.md.

Sections to Add

  1. Miri -- Running cargo +nightly miri test to detect undefined behavior, aliasing violations, memory leaks in unsafe code
  2. Cargo-fuzz / AFL -- Setting up fuzz targets for parsers and input-processing code, corpus management
  3. Sanitizers -- AddressSanitizer (ASan), ThreadSanitizer (TSan), MemorySanitizer (MSan) via RUSTFLAGS
  4. Property Testing Deep Dive -- proptest strategies, shrinking, regression files, custom generators

Source Reference

Section 7 (Testing Strategies for Systems Code) from RUST_SYSTEM_PROGRAMMING_BEST_PRACTICES.md

Disciplined Engineering Alignment

Phase Skill Advanced Testing Relevance
Research disciplined-research Identify unsafe code paths needing Miri; catalogue parser inputs for fuzz corpus seeding
Design disciplined-design Specify which verification tools apply to each module; design fuzz harness API
Implementation disciplined-implementation Add fuzz targets as implementation steps; integrate sanitizers into test runner config
Verification disciplined-verification Primary phase: Miri runs on all unsafe code; TSan on all concurrent code; fuzz campaigns on parsers; property tests on invariants
Validation disciplined-validation Confirm fuzz campaigns have adequate coverage; validate no UB in production-like environment

The SKILL.md should note:

  • During verification (Phase 4): Miri, TSan, and fuzzing are mandatory gates for unsafe/concurrent code
  • During design (Phase 2): specify fuzz corpus strategy and sanitizer requirements upfront
  • Cross-reference unsafe code policy in rust-development skill

Relevance to Terraphim

Terraphim's Aho-Corasick automata and text processing pipelines benefit directly from fuzzing and Miri verification.

Acceptance Criteria

  • SKILL.md updated with Miri, fuzzing, and sanitizer sections
  • Includes practical setup commands and CI integration examples
  • Cross-references unsafe code policy in rust-development skill
  • Disciplined workflow integration notes included

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions