.NET API
IRunScoreStore
Tracon.Abstractions.dllThe store for run and message scores (RunScore).
public interface IRunScoreStoreRemarks
Section titled “Remarks”Not added as a member to IRunStore: a score follows a different lifecycle (written rarely, whereas IRunStore is on the hot path written on every run), and a separate interface fits better with the rule that every extension point must be replaceable.
Tenant behavior — EXPECTED tenant, uniformly. Every member is scoped by an explicit tenant: IRunScoreStore.UpsertAsync reads it from RunScore.TenantId, IRunScoreStore.ListAsync and IRunScoreStore.DeleteAsync take it as a parameter. The ambient tenant is never consulted.
Methods
Section titled “Methods”DeleteAsync(string, Guid, CancellationToken)
Section titled “ DeleteAsync(string, Guid, CancellationToken)”Deletes a score.
ValueTask<bool> DeleteAsync(string tenantId, Guid scoreId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant.
scoreId Guid
The score identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if deleted; false if no such score exists.
ListAsync(string, Guid, CancellationToken)
Section titled “ ListAsync(string, Guid, CancellationToken)”Lists all of a run’s scores.
ValueTask<IReadOnlyList<RunScore>> ListAsync(string tenantId, Guid runId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant.
runId Guid
The run identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<RunScore>>
The scores. No order is guaranteed.
SummarizeAsync(RunScoreQuery, CancellationToken)
Section titled “ SummarizeAsync(RunScoreQuery, CancellationToken)”Aggregates the scores matching a filter.
ValueTask<RunScoreSummary> SummarizeAsync(RunScoreQuery query, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”query RunScoreQuery
The filter and breakdown options.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The summary. Never null; an empty match returns empty lists.
Remarks
Section titled “Remarks”A query, not a counter: it reads the rows that already exist. The live,
in-memory indicator of OnlineEvalSummaryService is unchanged by
this member — it keeps resetting when the process restarts. This one
survives a restart because it is computed from IRunScoreStore.UpsertAsync’s
own rows, not a separate running total (no durable counter store is
introduced).
UpsertAsync(RunScore, CancellationToken)
Section titled “ UpsertAsync(RunScore, CancellationToken)”Adds or updates a score.
ValueTask<RunScore> UpsertAsync(RunScore score, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”score RunScore
The score. If RunScore.Id is empty (Guid.Empty), a new identifier is generated.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The score written.
Remarks
Section titled “Remarks”When the same author (RunScore.Author) writes the same RunScore.Name onto the same target (a run or a message) a second time, the row is updated, not opened as a new row. A different name from the same author opens a new row. If RunScore.Author is empty, the rule does not apply; every call writes a new row.
The score is validated with RunScoreRules.Validate before it is written; every implementation must do the same.
Exceptions
Section titled “Exceptions”score breaks a RunScoreRules invariant.