henitai 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +80 -1
  3. data/README.md +123 -2
  4. data/assets/schema/henitai.schema.json +35 -0
  5. data/lib/henitai/available_cpu_count.rb +16 -23
  6. data/lib/henitai/canonical_report_merger.rb +107 -0
  7. data/lib/henitai/canonical_report_writer.rb +22 -0
  8. data/lib/henitai/checkpoint_reporter.rb +79 -0
  9. data/lib/henitai/cli/clean_command.rb +14 -8
  10. data/lib/henitai/cli/command_support.rb +2 -1
  11. data/lib/henitai/cli/operator_command.rb +2 -1
  12. data/lib/henitai/cli/options.rb +21 -57
  13. data/lib/henitai/cli/run_command.rb +36 -3
  14. data/lib/henitai/cli/run_options.rb +108 -0
  15. data/lib/henitai/cli.rb +12 -4
  16. data/lib/henitai/composite_progress_reporter.rb +42 -0
  17. data/lib/henitai/configuration.rb +41 -9
  18. data/lib/henitai/configuration_validator/rules.rb +18 -0
  19. data/lib/henitai/configuration_validator/scalars.rb +46 -0
  20. data/lib/henitai/configuration_validator.rb +8 -1
  21. data/lib/henitai/coverage_bootstrapper.rb +54 -5
  22. data/lib/henitai/coverage_formatter.rb +5 -1
  23. data/lib/henitai/coverage_report_reader.rb +28 -5
  24. data/lib/henitai/execution_engine/env_scope.rb +67 -0
  25. data/lib/henitai/execution_engine.rb +111 -50
  26. data/lib/henitai/generated_artifacts.rb +58 -0
  27. data/lib/henitai/incremental_filter.rb +100 -0
  28. data/lib/henitai/integration/child_debug_support.rb +6 -2
  29. data/lib/henitai/integration/coverage_suppression.rb +9 -0
  30. data/lib/henitai/integration/minitest.rb +11 -43
  31. data/lib/henitai/integration/minitest_load_path.rb +14 -0
  32. data/lib/henitai/integration/minitest_suite_command.rb +17 -0
  33. data/lib/henitai/integration/minitest_test_runner.rb +39 -0
  34. data/lib/henitai/integration/rails_environment_preloader.rb +14 -0
  35. data/lib/henitai/integration/rspec_child_runner.rb +3 -3
  36. data/lib/henitai/integration/rspec_test_selection.rb +3 -0
  37. data/lib/henitai/integration/scenario_log_support.rb +64 -20
  38. data/lib/henitai/minitest_coverage_reporter.rb +4 -1
  39. data/lib/henitai/mutant/activator.rb +14 -0
  40. data/lib/henitai/mutant.rb +13 -6
  41. data/lib/henitai/mutant_history_store/sql.rb +21 -3
  42. data/lib/henitai/mutant_history_store/verdict_cache.rb +84 -0
  43. data/lib/henitai/mutant_history_store.rb +62 -12
  44. data/lib/henitai/mutant_identity.rb +33 -2
  45. data/lib/henitai/mutation_skip_directives.rb +227 -0
  46. data/lib/henitai/operator.rb +3 -1
  47. data/lib/henitai/operators/equality_identity_operator.rb +51 -0
  48. data/lib/henitai/operators/equality_operator.rb +8 -3
  49. data/lib/henitai/operators.rb +1 -0
  50. data/lib/henitai/per_test_coverage.rb +66 -0
  51. data/lib/henitai/per_test_coverage_collector.rb +20 -5
  52. data/lib/henitai/per_test_coverage_selector.rb +11 -33
  53. data/lib/henitai/reporter/dashboard_metadata_provider.rb +113 -0
  54. data/lib/henitai/reporter.rb +238 -117
  55. data/lib/henitai/reports_directory_lock.rb +76 -0
  56. data/lib/henitai/result.rb +72 -9
  57. data/lib/henitai/runner.rb +82 -40
  58. data/lib/henitai/scenario_execution_result.rb +12 -0
  59. data/lib/henitai/slot_scheduler/draining.rb +21 -15
  60. data/lib/henitai/slot_scheduler.rb +73 -15
  61. data/lib/henitai/static_filter.rb +16 -6
  62. data/lib/henitai/survivor_rerun_strategy.rb +1 -1
  63. data/lib/henitai/survivor_test_filter.rb +1 -1
  64. data/lib/henitai/test_prioritizer.rb +28 -2
  65. data/lib/henitai/timeout_calibrator.rb +44 -0
  66. data/lib/henitai/verdict_fingerprint.rb +155 -0
  67. data/lib/henitai/version.rb +1 -1
  68. data/lib/henitai.rb +14 -1
  69. data/sig/henitai.rbs +230 -25
  70. metadata +22 -3
  71. data/lib/henitai/parallel_execution_runner.rb +0 -153
data/sig/henitai.rbs CHANGED
@@ -67,6 +67,9 @@ module Henitai
67
67
  class CoverageError < StandardError
68
68
  end
69
69
 
70
+ class ConcurrentRunError < StandardError
71
+ end
72
+
70
73
  class GitDiffError < StandardError
71
74
  end
72
75
 
@@ -140,10 +143,15 @@ module Henitai
140
143
 
141
144
  class Configuration
142
145
  DEFAULT_TIMEOUT: Float
146
+ DEFAULT_TIMEOUT_MULTIPLIER: Float
143
147
  DEFAULT_OPERATORS: Symbol
144
148
  DEFAULT_JOBS: untyped
145
149
  DEFAULT_MAX_MUTANTS_PER_LINE: Integer
146
150
  DEFAULT_MAX_FLAKY_RETRIES: Integer
151
+ DEFAULT_MAX_LOG_BYTES: Integer
152
+ DEFAULT_MAX_TIMEOUT: Float
153
+ DEFAULT_CHECKPOINT_EVERY: Integer
154
+ DEFAULT_CHECKPOINT_INTERVAL: Float
147
155
  DEFAULT_REPORTS_DIR: String
148
156
  DEFAULT_COVERAGE_CRITERIA: Hash[Symbol, bool]
149
157
  DEFAULT_THRESHOLDS: Hash[Symbol, Integer]
@@ -152,22 +160,30 @@ module Henitai
152
160
  attr_reader integration: untyped
153
161
  attr_reader includes: Array[String]
154
162
  attr_reader excludes: Array[String]
163
+ attr_reader test_excludes: Array[String]
155
164
  attr_reader operators: Symbol
156
165
  attr_reader timeout: Float
166
+ attr_reader timeout_multiplier: Float
157
167
  attr_reader ignore_patterns: Array[untyped]
158
168
  attr_reader max_mutants_per_line: Integer
159
169
  attr_reader max_flaky_retries: Integer
170
+ attr_reader max_log_bytes: Integer
171
+ attr_reader max_timeout: Float
160
172
  attr_reader sampling: untyped
161
173
  attr_reader jobs: untyped
162
174
  attr_reader coverage_criteria: Hash[Symbol, untyped]
163
175
  attr_reader thresholds: Hash[Symbol, Integer]
164
176
  attr_reader reporters: Array[String]
165
177
  attr_reader reports_dir: String
178
+ attr_reader checkpoint_enabled: bool
179
+ attr_reader checkpoint_every: Integer
180
+ attr_reader checkpoint_interval: Float
166
181
  attr_reader dashboard: Hash[Symbol, untyped]
167
182
  attr_reader all_logs: bool
168
183
 
169
184
  def self.load: (?path: String, ?overrides: Hash[Symbol, untyped]) -> Configuration
170
185
  def initialize: (?path: String, ?overrides: Hash[Symbol, untyped]) -> void
186
+ def timeout_configured?: () -> bool
171
187
 
172
188
  private
173
189
 
@@ -176,6 +192,8 @@ module Henitai
176
192
  def apply_defaults: (Hash[Symbol, untyped]) -> void
177
193
  def apply_general_defaults: (Hash[Symbol, untyped]) -> void
178
194
  def apply_mutation_defaults: (Hash[Symbol, untyped]) -> void
195
+ def apply_mutation_limit_defaults: (Hash[Symbol, untyped]) -> void
196
+ def apply_reports_defaults: (Hash[Symbol, untyped]) -> void
179
197
  def apply_analysis_defaults: (Hash[Symbol, untyped]) -> void
180
198
  def merge_defaults: (Hash[Symbol, untyped], Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
181
199
  def resolve_integration_default: (untyped) -> untyped
@@ -225,6 +243,8 @@ module Henitai
225
243
  end
226
244
 
227
245
  class Mutant
246
+ include UnparseHelper
247
+
228
248
  STATUSES: Array[Symbol]
229
249
 
230
250
  attr_reader id: String
@@ -240,11 +260,15 @@ module Henitai
240
260
  attr_accessor duration: Float?
241
261
  attr_accessor covered_by: Array[String]?
242
262
  attr_accessor tests_completed: Integer?
263
+ attr_accessor ignore_reason: String?
264
+ attr_accessor from_cache: bool
243
265
  attr_reader precomputed_stable_id: String?
244
266
  attr_reader precomputed_activation_source: String?
245
267
 
246
268
  def initialize: (subject: Subject, operator: String, nodes: Hash[Symbol, untyped], description: String, location: Hash[Symbol, untyped], ?precomputed_stable_id: String?, ?precomputed_activation_source: String?) -> void
247
269
  def stable_id: () -> String
270
+ def mutated_source: () -> String
271
+ def from_cache?: () -> bool
248
272
  def killed?: () -> bool
249
273
  def survived?: () -> bool
250
274
  def pending?: () -> bool
@@ -263,7 +287,7 @@ module Henitai
263
287
  REPORT_FILE_NAME: String
264
288
 
265
289
  def initialize: () -> void
266
- def record_test: (String) -> void
290
+ def record_test: (String, ?duration: Float?) -> void
267
291
  def write_report: () -> void
268
292
 
269
293
  private
@@ -304,9 +328,26 @@ module Henitai
304
328
  def sample: (Array[Mutant], ratio: Float, ?strategy: Symbol) -> Array[Mutant]
305
329
  end
306
330
 
331
+ class TimeoutCalibrator
332
+ FLOOR_SECONDS: Float
333
+
334
+ def initialize: (timing_source: untyped, multiplier: untyped) -> void
335
+ def timeout_for: (untyped) -> Float?
336
+
337
+ private
338
+
339
+ def durations: () -> Hash[String, untyped]
340
+ def normalize: (untyped) -> String
341
+ end
342
+
307
343
  class TestPrioritizer
308
- def initialize: () -> void
344
+ def initialize: (?timing_source: untyped?) -> void
309
345
  def sort: (Array[String], untyped, Hash[untyped, untyped]) -> Array[String]
346
+
347
+ private
348
+
349
+ def runtime: (untyped) -> Float
350
+ def timing_durations: () -> Hash[String, untyped]
310
351
  end
311
352
 
312
353
  class Operator
@@ -500,20 +541,29 @@ module Henitai
500
541
 
501
542
  module MutantIdentity
502
543
  def self.stable_id: (Mutant) -> String
544
+ def self.legacy_stable_id: (Mutant) -> String
503
545
  end
504
546
 
505
547
  class MutantHistoryStore
506
548
  attr_reader path: String
507
549
 
508
- def initialize: (path: String) -> void
550
+ def initialize: (path: String, ?per_test_coverage: PerTestCoverage?) -> void
509
551
  def record: (untyped, version: String, ?recorded_at: Time) -> void
552
+ def verdict_for: (String) -> Hash[Symbol, untyped]?
553
+ def killed_verdict_for: (String) -> Hash[Symbol, untyped]?
510
554
  def trend_report: () -> Hash[Symbol, untyped]
511
555
 
512
556
  module Sql
513
557
  RUNS_TABLE: String
514
558
  MUTANTS_TABLE: String
559
+ MIGRATION_COLUMNS: Hash[String, String]
515
560
  INSERT_RUN: String
516
561
  UPSERT_MUTANT: String
562
+ VERDICT_LOOKUP: String
563
+ end
564
+
565
+ module VerdictCache
566
+ CACHEABLE_STATUSES: Array[String]
517
567
  end
518
568
  end
519
569
 
@@ -546,11 +596,7 @@ module Henitai
546
596
  class CoverageReportReader
547
597
  def coverage_lines_by_file: (?String) -> Hash[String, Array[Integer]]
548
598
  def test_lines_by_file: (?String) -> Hash[String, Hash[String, Array[Integer]]]
549
- end
550
-
551
- class ParallelExecutionRunner
552
- def initialize: (worker_count: Integer) -> void
553
- def run: (Array[Mutant], untyped, untyped, untyped, ?Hash[Symbol, untyped]) -> void
599
+ def durations_by_test: (?String) -> Hash[String, Float]
554
600
  end
555
601
 
556
602
  class ProcessWorkerRunner
@@ -567,6 +613,7 @@ module Henitai
567
613
 
568
614
  class SlotScheduler
569
615
  PROCESS_DRAIN_WINDOW: Float
616
+ WORKER_SLOT_ENV: String
570
617
 
571
618
  Slot: untyped
572
619
 
@@ -591,17 +638,106 @@ module Henitai
591
638
  def interrupt_active_slots: () -> void
592
639
  end
593
640
 
641
+ class IncrementalFilter
642
+ def initialize: (history_store: untyped, ?per_test_coverage: PerTestCoverage?, ?dependency_fingerprint: String?) -> void
643
+ def apply: (Array[Mutant]) -> Array[Mutant]
644
+
645
+ private
646
+
647
+ def history_store: () -> untyped
648
+ def per_test_coverage: () -> PerTestCoverage?
649
+ def dependency_fingerprint: () -> String?
650
+ def ambiguous_stable_ids: (Array[Mutant]) -> Set[String]
651
+ def reusable_status: (Mutant) -> Symbol?
652
+ def killed_reusable?: (Mutant, Hash[Symbol, untyped]) -> bool
653
+ def survived_reusable?: (Mutant, Hash[Symbol, untyped]) -> bool
654
+ def subject_source_unchanged?: (Mutant, Hash[Symbol, untyped]) -> bool
655
+ end
656
+
657
+ module VerdictFingerprint
658
+ DEPENDENCY_GLOBS: Array[String]
659
+
660
+ def self?.subject_source_hash: (untyped) -> String?
661
+ def self?.tests_fingerprint: (untyped) -> String?
662
+ def self?.tests_fingerprint_current?: (String?) -> bool
663
+ def self?.dependency_fingerprint: (?String) -> String?
664
+ def self?.survivor_tests_fingerprint: (untyped, dependency_sha: String?) -> String?
665
+ def self?.survivor_fingerprint_current?: (String?, live_paths: Array[String], dependency_sha: String?) -> bool
666
+ def self?.survivor_fingerprint_matches?: (untyped, Array[String], String?) -> bool
667
+ def self?.combined_content_sha: (untyped) -> String?
668
+ end
669
+
670
+ module CanonicalReportMerger
671
+ def self.merge: (Hash[Symbol, untyped], String, ?prune_missing: bool) -> Hash[String, untyped]
672
+ end
673
+
674
+ module CanonicalReportWriter
675
+ def self.write: (Hash[Symbol, untyped], path: String, authoritative: bool) -> Hash[untyped, untyped]
676
+ end
677
+
678
+ class ReportsDirectoryLock
679
+ LOCK_FILENAME: String
680
+
681
+ def initialize: (reports_dir: String) -> void
682
+ def synchronize: () { () -> untyped } -> untyped
683
+
684
+ private
685
+
686
+ def lock_path: () -> String
687
+ def acquire: (File) -> void
688
+ def owner_pid: (File) -> (Integer | String)
689
+ def contention_message: (Integer | String) -> String
690
+ def write_owner: (File) -> untyped
691
+ end
692
+
693
+ class CheckpointReporter
694
+ def initialize: (config: untyped, source_provider: untyped, authoritative: bool, ?started_at: untyped, ?clock: untyped) -> void
695
+ def progress: (untyped, ?scenario_result: untyped) -> void
696
+ end
697
+
698
+ class CompositeProgressReporter
699
+ def self.for: (config: untyped, source_provider: untyped, full_run: bool) -> untyped?
700
+ def initialize: (Array[untyped]) -> void
701
+ def progress: (untyped, ?scenario_result: untyped) -> void
702
+ end
703
+
704
+ class MutationSkipDirectives
705
+ def skip?: (Mutant) -> bool
706
+ def directive_for: (Mutant) -> untyped
707
+ end
708
+
594
709
  class StaticFilter
595
- def initialize: (?coverage_report_reader: CoverageReportReader) -> void
710
+ def initialize: (?coverage_report_reader: CoverageReportReader, ?skip_directives: MutationSkipDirectives) -> void
596
711
  def apply: (Array[Mutant], untyped) -> Array[Mutant]
597
712
  def coverage_lines_for: (untyped) -> Hash[String, Array[Integer]]
598
713
  def coverage_lines_by_file: (?String) -> Hash[String, Array[Integer]]
599
714
  def test_lines_by_file: (?String) -> Hash[String, Hash[String, Array[Integer]]]
600
715
  end
601
716
 
717
+ class PerTestCoverage
718
+ def initialize: (reports_dir: String, ?coverage_report_reader: CoverageReportReader) -> void
719
+ def available?: () -> bool
720
+ def tests_covering: (untyped) -> Array[String]
721
+ def covers?: (String, untyped) -> bool
722
+
723
+ private
724
+
725
+ def reports_dir: () -> String
726
+ def coverage_report_reader: () -> CoverageReportReader
727
+ def location_available?: (untyped) -> bool
728
+ def coverage_lines_for: (String, untyped) -> Array[Integer]
729
+ def mutant_lines: (untyped) -> Array[Integer]
730
+ def map: () -> Hash[String, Hash[String, Array[Integer]]]
731
+ end
732
+
602
733
  class PerTestCoverageSelector
603
734
  def initialize: (?coverage_report_reader: CoverageReportReader) -> void
604
735
  def filter: (Array[String], Mutant, reports_dir: String) -> Array[String]
736
+
737
+ private
738
+
739
+ def per_test_coverage: (String) -> PerTestCoverage
740
+ def coverage_report_reader: () -> CoverageReportReader
605
741
  end
606
742
 
607
743
  class ExecutionEngine
@@ -609,13 +745,16 @@ module Henitai
609
745
 
610
746
  private
611
747
 
748
+ def execute: (Array[Mutant], untyped, untyped, untyped?) -> Array[Mutant]
749
+ def with_worker_slot: () { () -> untyped } -> untyped
612
750
  def parallel_execution?: (untyped, Array[Mutant]) -> bool
613
751
  def worker_count: (untyped) -> Integer
614
752
  def run_linear: (Array[Mutant], untyped, untyped, untyped?, untyped) -> void
615
753
  def run_parallel: (Array[Mutant], untyped, untyped, untyped?) -> void
616
754
  def process_mutant: (Mutant, untyped, untyped, untyped?, ?untyped) -> void
617
755
  def prioritized_tests_for: (Mutant, untyped, untyped) -> Array[String]
618
- def test_prioritizer: () -> TestPrioritizer
756
+ def test_prioritizer: (untyped) -> TestPrioritizer
757
+ def timing_source: (untyped) -> untyped
619
758
  def test_history: (untyped) -> Hash[untyped, untyped]
620
759
  def run_with_flaky_retry: (Mutant, untyped, untyped, Array[String], ?untyped) -> ScenarioExecutionResult
621
760
  def warn_flaky_mutants: (Integer) -> void
@@ -678,6 +817,8 @@ module Henitai
678
817
 
679
818
  def config: () -> Configuration
680
819
  def history_store: () -> MutantHistoryStore?
820
+ def authoritative?: (untyped) -> bool
821
+ def canonical_path: () -> String
681
822
  end
682
823
 
683
824
  class Terminal < Base
@@ -685,11 +826,13 @@ module Henitai
685
826
 
686
827
  PROGRESS_GLYPHS: Hash[Symbol, String]
687
828
 
829
+ def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?color_enabled: bool) -> void
688
830
  def report: (Result) -> void
689
831
  def progress: (untyped, ?scenario_result: ScenarioExecutionResult) -> void
690
832
 
691
833
  private
692
834
 
835
+ def color_enabled: () -> bool
693
836
  def report_lines: (Result) -> Array[String]
694
837
  def summary_lines: (untyped) -> Array[String]
695
838
  def full_summary_lines: (untyped) -> Array[String]
@@ -701,8 +844,14 @@ module Henitai
701
844
  def original_line: (Mutant) -> String
702
845
  def mutated_line: (Mutant) -> String
703
846
  def display_unparse: (untyped) -> String
847
+ def display_mutated_source: (untyped) -> String
848
+ def str_node?: (untyped) -> bool
849
+ def source_slice: (untyped) -> String?
704
850
  def score_line: (Result) -> String
705
851
  def format_row: (String, untyped) -> String
852
+ def reused_verdicts_line: (Result) -> String?
853
+ def reused_mutants: (Result) -> Array[Mutant]
854
+ def executed_only_score_line: (Result) -> String?
706
855
  def count_status: (Result, Symbol) -> Integer
707
856
  def format_duration: (Float) -> String
708
857
  def format_percent: (Float?) -> String
@@ -718,13 +867,12 @@ module Henitai
718
867
 
719
868
  private
720
869
 
721
- def write_canonical: (Hash[Symbol, untyped]) -> void
870
+ def write_canonical: (Hash[Symbol, untyped], authoritative: bool) -> void
722
871
  def write_session_snapshot: (Hash[Symbol, untyped]) -> void
723
872
  def write_activation_recipes: (untyped) -> void
724
873
  def survived_mutants_for: (untyped) -> Array[Mutant]
725
874
  def session_snapshot_path: (String) -> String
726
875
  def session_recipe_path: (String) -> String
727
- def canonical_path: () -> String
728
876
  def write_history_report: () -> void
729
877
  def default_history_store: () -> MutantHistoryStore
730
878
  def history_report_path: () -> String
@@ -732,22 +880,74 @@ module Henitai
732
880
 
733
881
  class Html < Base
734
882
  def report: (Result) -> void
883
+ def report_schema: (Hash[untyped, untyped]) -> void
735
884
 
736
885
  private
737
886
 
738
887
  def report_path: () -> String
739
- def html_document: (Result) -> String
740
- def escaped_report_json: (Result) -> String
888
+ def html_document: (Hash[untyped, untyped]) -> String
889
+ def schema_for: (Result) -> Hash[untyped, untyped]
890
+ def escaped_report_json: (Hash[untyped, untyped]) -> String
891
+ end
892
+
893
+ class DryRun < Base
894
+ def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?io: untyped) -> void
895
+ def report: (untyped) -> void
896
+
897
+ private
898
+
899
+ def io: () -> untyped
900
+ def listing_lines: (untyped) -> Array[String]
901
+ def grouped_lines: (untyped) -> Array[String]
902
+ def subject_label: (untyped) -> String
903
+ def mutant_line: (untyped) -> String
904
+ def ignore_reason_for: (untyped) -> String?
905
+ def summary_line: (untyped) -> String
906
+ end
907
+
908
+ class Github < Base
909
+ def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?io: untyped) -> void
910
+ def report: (Result) -> void
911
+
912
+ private
913
+
914
+ def io: () -> untyped
915
+ def annotation_line: (Mutant) -> String
916
+ def relative_path: (String) -> String
917
+ def escape_message: (String) -> String
918
+ end
919
+
920
+ class DashboardMetadataProvider
921
+ def initialize: (dashboard_config: Hash[Symbol, untyped]?, ?env: untyped, ?git_executor: untyped) -> void
922
+ def project: () -> String?
923
+ def version: () -> String?
924
+ def api_key: () -> String?
925
+
926
+ private
927
+
928
+ def env_version: () -> String?
929
+ def ref_without_prefix: (String?) -> String?
930
+ def project_from_git_remote: () -> String?
931
+ def blank?: (String?) -> bool
932
+ def git_remote_url: () -> String?
933
+ def git_branch_name: () -> String?
934
+
935
+ def self.project_from_git_url: (String?) -> String?
936
+ def self.normalize_git_url: (String?) -> String?
937
+ def self.project_from_uri_url: (String) -> String?
938
+ def self.project_from_ssh_url: (String) -> String?
741
939
  end
742
940
 
743
941
  class Dashboard < Base
744
942
  DEFAULT_BASE_URL: String
745
943
  HTTP_TIMEOUT_SECONDS: Integer
746
944
 
945
+ def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?metadata_provider: DashboardMetadataProvider?) -> void
747
946
  def report: (Result) -> void
748
947
 
749
948
  private
750
949
 
950
+ def metadata_provider: () -> DashboardMetadataProvider
751
951
  def ready?: () -> bool
752
952
  def build_request: (Result, untyped) -> untyped
753
953
  def request_headers: () -> Hash[String, String]
@@ -756,20 +956,11 @@ module Henitai
756
956
  def base_url: () -> String
757
957
  def project: () -> String?
758
958
  def version: () -> String?
759
- def env_version: () -> String?
760
- def ref_without_prefix: (String?) -> String?
761
- def project_from_git_remote: () -> String?
762
959
  def api_key: () -> String?
763
960
  def project_path: () -> String
764
961
  def encoded_version: () -> String
765
- def blank?: (String?) -> bool
766
- def git_remote_url: () -> String?
767
- def git_branch_name: () -> String?
768
962
 
769
963
  def self.project_from_git_url: (String?) -> String?
770
- def self.normalize_git_url: (String?) -> String?
771
- def self.project_from_uri_url: (String) -> String?
772
- def self.project_from_ssh_url: (String) -> String?
773
964
  end
774
965
  end
775
966
 
@@ -787,20 +978,25 @@ module Henitai
787
978
  attr_reader session_id: String
788
979
  attr_reader git_sha: String?
789
980
 
790
- def initialize: (mutants: Array[Mutant], started_at: Time, finished_at: Time, ?thresholds: Hash[Symbol, Integer]?, ?partial_rerun: bool, ?survivor_stats: Hash[Symbol, untyped]?, ?session_id: String, ?git_sha: String?, ?source_provider: ^(String) -> String) -> void
981
+ def initialize: (mutants: Array[Mutant], started_at: Time, finished_at: Time, ?thresholds: Hash[Symbol, Integer]?, ?partial_rerun: bool, ?survivor_stats: Hash[Symbol, untyped]?, ?session_id: String, ?git_sha: String?, ?source_provider: ^(String) -> String, ?authoritative: bool) -> void
791
982
  def partial_rerun?: () -> bool
983
+ def authoritative?: () -> bool
792
984
  def killed: () -> Integer
793
985
  def survived: () -> Integer
794
986
  def equivalent: () -> Integer
795
987
  def detected: () -> Integer
796
988
  def mutation_score: () -> Float?
797
989
  def mutation_score_indicator: () -> Float?
990
+ def executed_scoring_summary: () -> Hash[Symbol, untyped]?
798
991
  def scoring_summary: () -> Hash[Symbol, untyped]
799
992
  def duration: () -> Float
800
993
  def to_stryker_schema: () -> Hash[Symbol, untyped]
801
994
 
802
995
  private
803
996
 
997
+ def detected_in: (Array[Mutant]) -> Integer
998
+ def mutation_score_for: (Array[Mutant]) -> Float?
999
+ def mutation_score_indicator_for: (Array[Mutant]) -> Float?
804
1000
  def base_schema: () -> Hash[Symbol, untyped]
805
1001
  def unmatched_survivor_ids: () -> Array[String]
806
1002
  def build_files_section: () -> Hash[Symbol, untyped]
@@ -810,6 +1006,9 @@ module Henitai
810
1006
  def location_for: (Mutant) -> Hash[Symbol, untyped]
811
1007
  def line_column: (Mutant, Symbol) -> Hash[Symbol, Integer]
812
1008
  def duration_for: (Mutant) -> Integer?
1009
+ def status_reason_for: (Mutant) -> String?
1010
+ def from_cache_for: (Mutant) -> bool?
1011
+ def legacy_stable_id_for: (Mutant) -> String?
813
1012
  def equivalence_uncertainty: () -> String?
814
1013
  def stryker_status: (Symbol) -> String
815
1014
  end
@@ -863,7 +1062,7 @@ module Henitai
863
1062
  attr_reader config: Configuration
864
1063
  attr_reader result: untyped
865
1064
 
866
- def initialize: (?config: Configuration, ?subjects: Array[Subject], ?since: String, ?survivors_from: String?) -> void
1065
+ def initialize: (?config: Configuration, ?subjects: Array[Subject], ?since: String, ?survivors_from: String?, ?mode: Hash[Symbol, bool]) -> void
867
1066
  def run: () -> Result
868
1067
  def resolve_subjects: (?Array[String]) -> untyped
869
1068
  def generate_mutants: (untyped) -> untyped
@@ -880,6 +1079,7 @@ module Henitai
880
1079
  def operators: () -> untyped
881
1080
  def progress_reporter: () -> untyped?
882
1081
  def history_store: () -> untyped
1082
+ def per_test_coverage: () -> PerTestCoverage
883
1083
  def history_store_path: () -> String
884
1084
  def source_files: () -> Array[String]
885
1085
  def included_source_files: () -> Array[String]
@@ -893,6 +1093,10 @@ module Henitai
893
1093
  private
894
1094
 
895
1095
  def build_result: (Array[Mutant], Time, Time) -> Result
1096
+ def build_result_object: (Array[Mutant], Time, Time) -> Result
1097
+ def pipeline_mutants: () -> Array[Mutant]
1098
+ def apply_incremental_filter: (Array[Mutant]) -> Array[Mutant]
1099
+ def dry_run_result: (Array[Mutant], Time, Time) -> Result
896
1100
  def source_provider: () -> ^(String) -> String
897
1101
  def persist_history: (Result, Time) -> void
898
1102
  def bootstrap_coverage: (Array[String], ?Array[String]?) -> void
@@ -901,6 +1105,7 @@ module Henitai
901
1105
  def with_reports_dir: () { () -> untyped } -> untyped
902
1106
  def result_thresholds: () -> Hash[Symbol, Integer]?
903
1107
  def survivor_rerun?: () -> bool
1108
+ def full_run?: () -> bool
904
1109
  def survivor_strategy: () -> SurvivorRerunStrategy
905
1110
  def safe_head_sha: () -> String?
906
1111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: henitai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Otten
@@ -103,6 +103,9 @@ files:
103
103
  - lib/henitai.rb
104
104
  - lib/henitai/arid_node_filter.rb
105
105
  - lib/henitai/available_cpu_count.rb
106
+ - lib/henitai/canonical_report_merger.rb
107
+ - lib/henitai/canonical_report_writer.rb
108
+ - lib/henitai/checkpoint_reporter.rb
106
109
  - lib/henitai/cli.rb
107
110
  - lib/henitai/cli/clean_command.rb
108
111
  - lib/henitai/cli/command_support.rb
@@ -110,6 +113,8 @@ files:
110
113
  - lib/henitai/cli/operator_command.rb
111
114
  - lib/henitai/cli/options.rb
112
115
  - lib/henitai/cli/run_command.rb
116
+ - lib/henitai/cli/run_options.rb
117
+ - lib/henitai/composite_progress_reporter.rb
113
118
  - lib/henitai/configuration.rb
114
119
  - lib/henitai/configuration_validator.rb
115
120
  - lib/henitai/configuration_validator/rules.rb
@@ -120,14 +125,21 @@ files:
120
125
  - lib/henitai/eager_load.rb
121
126
  - lib/henitai/equivalence_detector.rb
122
127
  - lib/henitai/execution_engine.rb
128
+ - lib/henitai/execution_engine/env_scope.rb
129
+ - lib/henitai/generated_artifacts.rb
123
130
  - lib/henitai/git_diff_analyzer.rb
131
+ - lib/henitai/incremental_filter.rb
124
132
  - lib/henitai/integration.rb
125
133
  - lib/henitai/integration/base.rb
126
134
  - lib/henitai/integration/child_debug_support.rb
127
135
  - lib/henitai/integration/child_runtime_control.rb
128
136
  - lib/henitai/integration/coverage_suppression.rb
129
137
  - lib/henitai/integration/minitest.rb
138
+ - lib/henitai/integration/minitest_load_path.rb
139
+ - lib/henitai/integration/minitest_suite_command.rb
140
+ - lib/henitai/integration/minitest_test_runner.rb
130
141
  - lib/henitai/integration/mutant_run_support.rb
142
+ - lib/henitai/integration/rails_environment_preloader.rb
131
143
  - lib/henitai/integration/rspec_child_runner.rb
132
144
  - lib/henitai/integration/rspec_process_runner.rb
133
145
  - lib/henitai/integration/rspec_test_selection.rb
@@ -141,7 +153,9 @@ files:
141
153
  - lib/henitai/mutant_generator.rb
142
154
  - lib/henitai/mutant_history_store.rb
143
155
  - lib/henitai/mutant_history_store/sql.rb
156
+ - lib/henitai/mutant_history_store/verdict_cache.rb
144
157
  - lib/henitai/mutant_identity.rb
158
+ - lib/henitai/mutation_skip_directives.rb
145
159
  - lib/henitai/operator.rb
146
160
  - lib/henitai/operators.rb
147
161
  - lib/henitai/operators/arithmetic_operator.rb
@@ -150,6 +164,7 @@ files:
150
164
  - lib/henitai/operators/block_statement.rb
151
165
  - lib/henitai/operators/boolean_literal.rb
152
166
  - lib/henitai/operators/conditional_expression.rb
167
+ - lib/henitai/operators/equality_identity_operator.rb
153
168
  - lib/henitai/operators/equality_operator.rb
154
169
  - lib/henitai/operators/hash_literal.rb
155
170
  - lib/henitai/operators/logical_operator.rb
@@ -163,13 +178,15 @@ files:
163
178
  - lib/henitai/operators/string_literal.rb
164
179
  - lib/henitai/operators/unary_operator.rb
165
180
  - lib/henitai/operators/update_operator.rb
166
- - lib/henitai/parallel_execution_runner.rb
167
181
  - lib/henitai/parser_current.rb
182
+ - lib/henitai/per_test_coverage.rb
168
183
  - lib/henitai/per_test_coverage_collector.rb
169
184
  - lib/henitai/per_test_coverage_selector.rb
170
185
  - lib/henitai/process_wakeup.rb
171
186
  - lib/henitai/process_worker_runner.rb
172
187
  - lib/henitai/reporter.rb
188
+ - lib/henitai/reporter/dashboard_metadata_provider.rb
189
+ - lib/henitai/reports_directory_lock.rb
173
190
  - lib/henitai/result.rb
174
191
  - lib/henitai/rspec_coverage_formatter.rb
175
192
  - lib/henitai/runner.rb
@@ -190,7 +207,9 @@ files:
190
207
  - lib/henitai/survivor_test_filter.rb
191
208
  - lib/henitai/syntax_validator.rb
192
209
  - lib/henitai/test_prioritizer.rb
210
+ - lib/henitai/timeout_calibrator.rb
193
211
  - lib/henitai/unparse_helper.rb
212
+ - lib/henitai/verdict_fingerprint.rb
194
213
  - lib/henitai/version.rb
195
214
  - lib/henitai/warning_silencer.rb
196
215
  - sig/configuration_validator.rbs
@@ -204,7 +223,7 @@ metadata:
204
223
  changelog_uri: https://github.com/martinotten/henitai/blob/main/CHANGELOG.md
205
224
  documentation_uri: https://github.com/martinotten/henitai/blob/main/README.md
206
225
  homepage_uri: https://github.com/martinotten/henitai
207
- source_code_uri: https://github.com/martinotten/henitai/tree/v0.2.1
226
+ source_code_uri: https://github.com/martinotten/henitai/tree/v0.3.0
208
227
  rubygems_mfa_required: 'true'
209
228
  rdoc_options: []
210
229
  require_paths: