Class: KairosMcp::DslAst::DriftReport

Inherits:
Struct
  • Object
show all
Defined in:
lib/kairos_mcp/dsl_ast/drift_detector.rb

Overview

Report of all detected drifts for a skill

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#coverage_ratioObject

Returns the value of attribute coverage_ratio

Returns:

  • (Object)

    the current value of coverage_ratio



11
12
13
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 11

def coverage_ratio
  @coverage_ratio
end

#itemsObject

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



11
12
13
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 11

def items
  @items
end

#skill_idObject

Returns the value of attribute skill_id

Returns:

  • (Object)

    the current value of skill_id



11
12
13
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 11

def skill_id
  @skill_id
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



11
12
13
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 11

def timestamp
  @timestamp
end

Instance Method Details

#drifted?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 12

def drifted?
  !items.empty?
end

#errorsObject



16
17
18
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 16

def errors
  items.select { |i| i.severity == :error }
end

#infosObject



24
25
26
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 24

def infos
  items.select { |i| i.severity == :info }
end

#summaryObject



28
29
30
31
32
33
34
35
36
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 28

def summary
  {
    total: items.size,
    errors: errors.size,
    warnings: warnings.size,
    info: infos.size,
    coverage_ratio: coverage_ratio
  }
end

#warningsObject



20
21
22
# File 'lib/kairos_mcp/dsl_ast/drift_detector.rb', line 20

def warnings
  items.select { |i| i.severity == :warning }
end