RunToCasePromoter
AgentPrism.Core.dllPromotes a production run to an evaluation case.
public sealed class RunToCasePromoterInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The query text is read from the RunEventType.RunStarted event in
run_events; see RunRecordingAgent.ExtractQuery. It is the only durable
input location because a session is saved only after successful completion.
Therefore, the query of a failed run can never be read from a session. The original
session-based design always returned 422 for failed-run promotion.
Multi-turn behavior is detected by checking for an earlier run in this run’s
session. When present, this run’s query alone cannot reproduce the original
behavior because prior-turn context is missing. which forbids silent context loss.
Constructors
Section titled “Constructors”RunToCasePromoter(IRunStore, IRunScoreStore, IEvalStore)
Section titled “ RunToCasePromoter(IRunStore, IRunScoreStore, IEvalStore)”Initializes a promotion service.
public RunToCasePromoter(IRunStore runs, IRunScoreStore scores, IEvalStore evalStore)Parameters
Section titled “Parameters”runs IRunStore
scores IRunScoreStore
evalStore IEvalStore
Methods
Section titled “Methods”PromoteAsync(string, EvalSuite, Guid, EvalCaseSource?, CancellationToken)
Section titled “ PromoteAsync(string, EvalSuite, Guid, EvalCaseSource?, CancellationToken)”Attempts to promote a run to the supplied suite.
public ValueTask<RunPromotionOutcome> PromoteAsync(string tenantId, EvalSuite suite, Guid runId, EvalCaseSource? sourceKindOverride, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The requesting tenant.
suite EvalSuite
The target evaluation suite.
runId Guid
The run to promote.
sourceKindOverride EvalCaseSource?
Overrides the promotion reason. When null, it is inferred from the run’s status and score.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<RunPromotionOutcome>
The promotion outcome.