8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/evilution/mcp/mutate_tool/progress_streamer.rb', line 8
def self.build(server_context:, suggest_tests:, integration:)
return nil unless suggest_tests && server_context.respond_to?(:report_progress)
suggestion = Evilution::Reporter::Suggestion.new(suggest_tests: true, integration: integration)
survivor_index = 0
proc do |result|
next unless result.survived?
begin
survivor_index += 1
detail = build_suggestion_detail(result.mutation, suggestion)
server_context.report_progress(survivor_index, message: ::JSON.generate(detail))
rescue StandardError end
end
end
|