Module: Rigor::Protection::KillSignature
- Defined in:
- lib/rigor/protection/kill_signature.rb
Overview
ADR-69 Seam 1 — the identity a kill is judged by, shared by every diagnostic-based oracle.
A mutant is killed when re-analysis produces a diagnostic the clean baseline did not carry, so the
comparison needs an identity that is stable across two runs of the same code and distinct for two
genuinely different reports. path is part of it deliberately: the closure oracle (issue #254) pools
the baseline of several files into one set, and the same rule firing at the same line of a different
file must not be mistaken for the baseline's.
Lifted out of DiagnosticOracle when ClosureKillOracle arrived: two oracles disagreeing about what "the same diagnostic" means would show up only as an unexplained kill-count delta between them.
Class Method Summary collapse
-
.of(diagnostic) ⇒ Array
The comparison key.
-
.signatures_of(diagnostics) ⇒ Set<Array>
The signature set of
diagnostics.
Class Method Details
.of(diagnostic) ⇒ Array
Returns the comparison key.
20 21 22 |
# File 'lib/rigor/protection/kill_signature.rb', line 20 def of(diagnostic) [diagnostic.rule, diagnostic.path, diagnostic.line, diagnostic.column, diagnostic.] end |
.signatures_of(diagnostics) ⇒ Set<Array>
Returns the signature set of diagnostics.
26 27 28 |
# File 'lib/rigor/protection/kill_signature.rb', line 26 def signatures_of(diagnostics) diagnostics.to_set { |diagnostic| of(diagnostic) } end |