Class: Necropsy::Bench::ReleaseAudit

Inherits:
Object
  • Object
show all
Defined in:
lib/necropsy/bench/release_audit.rb,
lib/necropsy/bench/release_audit/git_snapshot.rb,
lib/necropsy/bench/release_audit/run_provenance.rb,
lib/necropsy/bench/release_audit/artifact_writer.rb,
lib/necropsy/bench/release_audit/config_validator.rb,
lib/necropsy/bench/release_audit/performance_gate.rb,
lib/necropsy/bench/release_audit/adversarial_runner.rb

Defined Under Namespace

Classes: AdversarialRunner, ArtifactWriter, ConfigValidator, GitSnapshot, PerformanceGate, RunProvenance

Constant Summary collapse

HIGH_CONFIDENCES =
%w[high certain].freeze
FALSE_POSITIVE_LABELS =
%w[alive external].freeze
REVIEW_FIELDS =
%w[outcome rationale reviewer].freeze
REVIEW_OUTCOMES =
%w[expected_safety_change false_positive true_positive].freeze
MAX_ENTRIES =
100_000
MAX_STRING_BYTES =
4_096

Instance Method Summary collapse

Constructor Details

#initialize(inputs) ⇒ ReleaseAudit

Returns a new instance of ReleaseAudit.



18
19
20
# File 'lib/necropsy/bench/release_audit.rb', line 18

def initialize(inputs)
  @inputs = inputs
end

Instance Method Details

#callObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/necropsy/bench/release_audit.rb', line 22

def call
  validate_inputs!
  comparisons = compare_reports
  new_high = newly_high_candidates(comparisons)
  review = review_status(comparisons)
  performance = performance_status
  precision = precision_gate_status
  claim = claim_gate_status
  gates = build_gates(new_high, review, performance, precision, claim)
  {
    'schema_version' => 1,
    'release' => config.fetch('release'),
    'baseline' => config.fetch('baseline'),
    'corpora' => comparisons,
    'new_high_candidates' => new_high,
    'review' => review,
    'performance' => performance,
    'precision_gate' => precision,
    'claim_gate' => claim,
    'performance_provenance' => performance_provenance,
    'adversarial_suites' => adversarial_results,
    'gates' => gates,
    'status' => gates.values.all? { |gate| gate['passed'] } ? 'pass' : 'fail'
  }
end