Class: RosettAi::Quorum::Collector

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/quorum/collector.rb

Overview

Normalizes per-engine responses to the standard adopt contract: { findings: [...], overall_status: "pass|warn|fail", summary: "..." }

Annotates each finding with its source engine.

Instance Method Summary collapse

Instance Method Details

#collect(dispatched) ⇒ Hash<String, Hash>

Normalize dispatched results into per-engine response hashes.

Parameters:

  • dispatched (Hash<String, Hash>)

    engine_name => dispatch result

Returns:

  • (Hash<String, Hash>)

    engine_name => normalized result



17
18
19
# File 'lib/rosett_ai/quorum/collector.rb', line 17

def collect(dispatched)
  dispatched.transform_values { |dispatch_entry| normalize(dispatch_entry) }
end