Class: Insika::Evals::TurnOutcome

Inherits:
Struct
  • Object
show all
Defined in:
lib/insika/evals/transport.rb

Overview

How the runner turns a (agent, conversation, message) into a TurnResult. The runner depends only on this seam, so it's unit-testable with a fake — the real HttpTransport is exercised against a running insika.

One turn's outcome: the TurnResult the engine asserts on + perf timing (ttfb/ total in ms) so --mode perf reports real latency over the real corpus (#6b).

usage is the turn's token counts as the deployment reported them (response.completed), or nil when the provider sent none. It is carried, never asserted on: the consumer is's refinement budget, which has to bound the cost of a gate replay and cannot invent the number. nil is preserved as nil rather than zeroed — "the provider did not say" and "it cost nothing" are different facts, and a budget that confuses them stops being a budget.

Instance Attribute Summary collapse

Instance Attribute Details

#resultObject

Returns the value of attribute result

Returns:

  • (Object)

    the current value of result



23
24
25
# File 'lib/insika/evals/transport.rb', line 23

def result
  @result
end

#totalObject

Returns the value of attribute total

Returns:

  • (Object)

    the current value of total



23
24
25
# File 'lib/insika/evals/transport.rb', line 23

def total
  @total
end

#ttfbObject

Returns the value of attribute ttfb

Returns:

  • (Object)

    the current value of ttfb



23
24
25
# File 'lib/insika/evals/transport.rb', line 23

def ttfb
  @ttfb
end

#usageObject

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



23
24
25
# File 'lib/insika/evals/transport.rb', line 23

def usage
  @usage
end