ITADN

fix(traces.rs): coveragestat::add catch-all silently discards second operand for mismatched variants

#1870Closedkumburovicbranko682-boop 创建于 2026-06-27
## Description The `Add` implementation for `CoverageStat` has a catch-all match arm `t => t.0` that silently drops the second operand when adding mismatched variants (e.g., `Line + Branch`, `Condition + Line`, `Branch + Condition`). Since `CoverageStat` includes a `Condition` variant that has no merge logic at all, and the type is used throughout trace accumulation, mismatched additions would silently corrupt coverage data by discarding hits. This is a real data integrity bug if condition coverage is ever used alongside line/branch coverage. **Severity**: `high` **File**: `src/traces.rs` ## Expected Behavior The code should handle this case properly to avoid unexpected errors or degraded quality.
关闭于 2026-06-28 0 条评论