Expand description
Proactive Bug Hunting Module
Implements Section 11 of the Popperian Falsification Checklist (BH-01 to BH-15). Provides falsification-driven defect discovery using multiple hunting modes.
§Philosophy
“A theory that explains everything, explains nothing.” — Karl Popper
Bug hunting operationalizes falsification: we systematically attempt to break code, not merely verify it works. Each mode represents a different strategy for falsifying the implicit claim “this code is correct.”
§Modes
- Falsify: Mutation-based invariant falsification (FDV pattern)
- Hunt: SBFL without failing tests (SBEST pattern)
- Analyze: LLM-augmented static analysis (LLIFT pattern)
- Fuzz: Targeted unsafe Rust fuzzing (FourFuzz pattern)
- DeepHunt: Hybrid concolic + SBFL (COTTONTAIL pattern)
§Advanced Features (BH-11 to BH-15)
- Spec-Driven: Hunt bugs guided by specification files
- Ticket-Scoped: Focus on areas defined by PMAT work tickets
- Scoped Analysis: –lib, –bin, –path for targeted hunting
- Bidirectional Linking: Update specs with findings
- False Positive Suppression: Filter known false positive patterns
§Integration with OIP
These modes leverage OIP’s SBFL (Tarantula/Ochiai/DStar), defect classification, and RAG enhancement to proactively identify bugs before they reach production.
Re-exports§
pub use localization::CrashBucketer;pub use localization::MultiChannelLocalizer;pub use localization::ScoredLocation;pub use patterns::compute_test_lines;pub use patterns::is_real_pattern;pub use patterns::should_suppress_finding;pub use spec::ParsedSpec;pub use ticket::PmatTicket;
Modules§
- blame
- Git Blame Integration
- cache
- Finding cache with mtime-based invalidation for bug-hunter.
- config
- Bug Hunter Configuration
- contracts
- Contract Verification Gap Analysis (BH-26)
- coverage
- Coverage-Based Hotpath Weighting
- diff
- Bug Hunter Diff Mode
- languages
- Multi-Language Pattern Support
- localization
- Advanced Fault Localization Module (BH-16 to BH-20)
- model_
parity - Model Parity Gap Analysis (BH-27)
- patterns
- Pattern detection utilities for bug-hunter.
- pmat_
quality - PMAT Quality Integration for Bug Hunter (BH-21 to BH-25)
- spec
- Spec-Driven Bug Hunting Module (BH-11, BH-14)
- ticket
- PMAT Work Ticket Integration (BH-12)
Structs§
- Channel
Weights - Multi-channel weights for fault localization (BH-19, BH-21).
- Finding
- A single bug finding.
- Finding
Evidence - Evidence supporting a finding.
- Hunt
Config - Configuration for a bug hunt.
- Hunt
Result - Result of a bug hunt.
- Hunt
Stats - Statistics from a bug hunt.
- Mode
Stats - Mode-specific statistics.
- Phase
Timings - Phase timing breakdown for bug-hunter pipeline.
Enums§
- Crash
Bucketing Mode - Crash bucketing mode (BH-20).
- Defect
Category - Category of defect (aligned with OIP categories).
- Evidence
Kind - Kind of evidence.
- Finding
Severity - Severity of a bug finding.
- Hunt
Mode - Mode of bug hunting operation.
- Localization
Strategy - Fault localization strategy (BH-16 to BH-19).
- Sbfl
Formula - SBFL formula for fault localization.
Functions§
- hunt
- Run bug hunting with the specified configuration.
- hunt_
ensemble - Run all modes and combine results (ensemble approach).
- hunt_
with_ spec - Run spec-driven bug hunting (BH-11).
- hunt_
with_ ticket - Run ticket-scoped bug hunting (BH-12).