Skip to content
Tracon

JudgeScore

Namespace Tracon · Assembly Tracon.Abstractions.dll

One named score produced by an IRunJudge.

public sealed record JudgeScore : IEquatable<JudgeScore>

objectJudgeScore

IEquatable<JudgeScore>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

A judge returns a list of these, and Tracon writes each one as its own RunScore row. JudgeScore.Name is part of the stored uniqueness key, so two scores a judge returns for the same run must not share a name; the second would overwrite the first.

A judge’s headline score is the one whose JudgeScore.Name equals IRunJudge.Name. Only the headline score feeds the online-evaluation window (its average and the run.score.low alarm) and the tracon.judge.score histogram, because both are defined on the 0-100 quality scale. A score under any other name is stored and readable, but it is never mixed into that average — a judge that reports several metrics on several scales would otherwise corrupt it.

A null JudgeScore.Value records that the judge made no measurement, which is not the same as a measurement of zero. A judge that prefers to write nothing at all returns no JudgeScore for that metric instead.

public JudgeScore()

The reason, written into RunScore.Comment.

public string? Comment { get; init; }

string?

Truncated to RunJudgment.MaxReasonLength characters before it is stored.

The shape of the value.

public required RunScoreKind Kind { get; init; }

RunScoreKind

The score’s stable, low-cardinality name.

public required string Name { get; init; }

string

Must match [A-Za-z0-9._-]{1,64}; RunScoreRules carries the rule. A judge that reports a single overall verdict uses its own IRunJudge.Name here.

The categorical value. Set only for a RunScoreKind.Categorical score.

public string? TextValue { get; init; }

string?

At most RunScoreRules.MaxTextValueLength characters.

The numeric value: 0/1 for RunScoreKind.Binary, 1 to 5 for RunScoreKind.Stars, 0 to 100 for RunScoreKind.Numeric.

public double? Value { get; init; }

double?

null means no measurement was made, not zero. Always null when JudgeScore.Kind is RunScoreKind.Categorical. A value outside its kind’s range is a contract violation: the score is not written and the judge is reported as failed.

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(JudgeScore? other)

other JudgeScore?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(JudgeScore? left, JudgeScore? right)

left JudgeScore?

right JudgeScore?

bool

public static bool operator !=(JudgeScore? left, JudgeScore? right)

left JudgeScore?

right JudgeScore?

bool