Class: Insika::RefinementStore::Run

Inherits:
Data
  • Object
show all
Defined in:
lib/insika/refinement_store.rb

Overview

candidate/gate are the WINNER — the one proposal a human is asked about, and the only thing ResolveRefinement ever applies. candidates is the whole panel (RFC-0013 §3.9, phase D): every candidate that was built, who wrote it, and how it scored, including the ones that lost and the ones the budget never gated. A phase-C run recorded one candidate and no panel; it still reads back correctly, because a panel of one is the same shape.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#agent_idObject (readonly)

Returns the value of attribute agent_id

Returns:

  • (Object)

    the current value of agent_id



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def agent_id
  @agent_id
end

#candidateObject (readonly)

Returns the value of attribute candidate

Returns:

  • (Object)

    the current value of candidate



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def candidate
  @candidate
end

#candidatesObject (readonly)

Returns the value of attribute candidates

Returns:

  • (Object)

    the current value of candidates



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def candidates
  @candidates
end

#costObject (readonly)

Returns the value of attribute cost

Returns:

  • (Object)

    the current value of cost



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def cost
  @cost
end

#decisionObject (readonly)

Returns the value of attribute decision

Returns:

  • (Object)

    the current value of decision



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def decision
  @decision
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def error
  @error
end

#excludedObject (readonly)

Returns the value of attribute excluded

Returns:

  • (Object)

    the current value of excluded



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def excluded
  @excluded
end

#findingsObject (readonly)

Returns the value of attribute findings

Returns:

  • (Object)

    the current value of findings



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def findings
  @findings
end

#finished_atObject (readonly)

Returns the value of attribute finished_at

Returns:

  • (Object)

    the current value of finished_at



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def finished_at
  @finished_at
end

#gateObject (readonly)

Returns the value of attribute gate

Returns:

  • (Object)

    the current value of gate



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def gate
  @gate
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def id
  @id
end

#started_atObject (readonly)

Returns the value of attribute started_at

Returns:

  • (Object)

    the current value of started_at



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def started_at
  @started_at
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def status
  @status
end

#windowObject (readonly)

Returns the value of attribute window

Returns:

  • (Object)

    the current value of window



57
58
59
# File 'lib/insika/refinement_store.rb', line 57

def window
  @window
end

Instance Method Details

#awaiting_approval?Boolean

Is there a gated proposal waiting for a human? The one question the Studio and the apply command both ask.

Returns:

  • (Boolean)


65
# File 'lib/insika/refinement_store.rb', line 65

def awaiting_approval? = status == :awaiting_approval

#editsObject



67
# File 'lib/insika/refinement_store.rb', line 67

def edits = (candidate || {})["edits"] || []

#findings_countObject



61
# File 'lib/insika/refinement_store.rb', line 61

def findings_count = findings.size

#gate_passed?Boolean

Returns:

  • (Boolean)


66
# File 'lib/insika/refinement_store.rb', line 66

def gate_passed? = gate.is_a?(Hash) && gate["passed"] == true

#panelObject



68
# File 'lib/insika/refinement_store.rb', line 68

def panel = Array(candidates)

#terminal?Boolean

Returns:

  • (Boolean)


60
# File 'lib/insika/refinement_store.rb', line 60

def terminal? = !OPEN.include?(status)