2727
2828@dataclass (frozen = True , kw_only = True , eq = False )
2929class EvaluationRecord :
30- """One online evaluation and the exact context it judged.
30+ """One stop-condition check and the exact context it judged.
3131
3232 Args:
3333 evaluator: Evaluator object that produced the result. Identity is the
@@ -43,7 +43,7 @@ class EvaluationRecord:
4343
4444@dataclass (kw_only = True )
4545class TraceRun :
46- """A completed linear trace and its latest online evaluation .
46+ """A completed linear trace and its latest stop-condition check .
4747
4848 ``turns`` is the driver/report view and may carry online evidence.
4949 ``raw_turns`` is the evaluator view and never carries framework-produced
@@ -55,15 +55,16 @@ class TraceRun:
5555 manifest: Agent capabilities used to create evaluator contexts.
5656 turns: Annotated history passed to prompt drivers and results.
5757 raw_turns: Annotation-free history passed to evaluators.
58- latest_online_evaluation: Most recent stop-condition evaluation.
58+ latest_stop_check: Most recent ``stop_when`` evaluation, or None when
59+ no stop condition was configured.
5960 """
6061
6162 trace_end_reason : TraceEndReason
6263 observability_level : ObservabilityLevel
6364 manifest : AppManifest | None = None
6465 turns : list [Turn ] = field (default_factory = list [Turn ])
6566 raw_turns : list [Turn ] = field (default_factory = list [Turn ])
66- latest_online_evaluation : EvaluationRecord | None = None
67+ latest_stop_check : EvaluationRecord | None = None
6768
6869
6970def _evaluation_context (
@@ -166,7 +167,7 @@ async def run_trace_async(
166167 manifest = manifest ,
167168 )
168169 evaluation = await stop_when .evaluate_async (context = context )
169- run .latest_online_evaluation = EvaluationRecord (
170+ run .latest_stop_check = EvaluationRecord (
170171 evaluator = stop_when ,
171172 context = context ,
172173 result = evaluation ,
@@ -190,10 +191,10 @@ async def evaluate_final_trace_async(
190191 evaluator : Evaluator ,
191192 run : TraceRun ,
192193) -> EvalResult | None :
193- """Evaluate the final raw trace, reusing an identical online judgment .
194+ """Evaluate the final raw trace, reusing an identical stop-condition check .
194195
195196 Args:
196- evaluator: Evaluator responsible for the final verdict .
197+ evaluator: Evaluator applied to the final trace .
197198 run: Completed trace from :func:`run_trace_async`.
198199
199200 Returns:
@@ -207,7 +208,7 @@ async def evaluate_final_trace_async(
207208 if not run .raw_turns :
208209 return None
209210
210- record = run .latest_online_evaluation
211+ record = run .latest_stop_check
211212 if (
212213 record is not None
213214 and record .evaluator is evaluator
0 commit comments