Module: OllamaAgent::Runtime::MutationClassifier

Defined in:
lib/ollama_agent/runtime/mutation_classifier.rb

Overview

Heuristic classification for saga compensation strategy (blob restore lands in E8).

Class Method Summary collapse

Class Method Details

.classify(intent) ⇒ :reversible, ...

Parameters:

  • intent (Hash)

Returns:

  • (:reversible, :compensatable, :irreversible)


11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ollama_agent/runtime/mutation_classifier.rb', line 11

def classify(intent)
  kind = intent[:kind] || intent["kind"]
  case kind.to_s
  when "atomic_write"
    :reversible
  when "http_post", "shell_exec"
    :irreversible
  else
    :compensatable
  end
end