Package dev.dokimos.server.dto.v1
Record Class GateResult
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.GateResult
- Record Components:
status- PASS, FAIL, or NO_BASELINEpassed- true when the gate allows the build to proceedcandidateRunId- the gated runbaselineRunId- the resolved baseline run, or null when NO_BASELINEpairing- how items were paired:dataset_item_id,positional, ornone(NO_BASELINE)baselinePassRate- baseline overall pass rate, or null when NO_BASELINEcandidatePassRate- candidate overall pass ratepassRateDelta- candidate minus baseline pass rate, or null when NO_BASELINEsignificant- whether the pass-rate change is statistically significantimprovedCount- count of items significantly improvedregressedCount- count of items significantly regressed (authoritative total)unchangedCount- count of items with no significant changeaddedCount- count of items present only in the candidateremovedCount- count of items present only in the baselineregressedEvaluators- evaluators flagged as significant regressionscases- up to 50 regressed items, for the PR comment (capped)casesTruncated- true whenregressedCountexceeds the size ofcases
public record GateResult(String status, boolean passed, UUID candidateRunId, UUID baselineRunId, String pairing, Double baselinePassRate, double candidatePassRate, Double passRateDelta, boolean significant, int improvedCount, int regressedCount, int unchangedCount, int addedCount, int removedCount, List<GateResult.RegressedEvaluator> regressedEvaluators, List<GateResult.RegressedCase> cases, boolean casesTruncated)
extends Record
Verdict of a CI regression gate.
passed is the single boolean CI should branch on: a build
fails only when status == FAIL. When no baseline can be resolved the status is
NO_BASELINE and passed is true (a first run cannot regress).
The shape is intentionally flat and JSON-friendly so a GitHub Action can render a PR comment
without walking nested objects. regressedEvaluators lists every significantly regressed
evaluator; cases lists up to 50 regressed items with their per-evaluator score drops. The
cases list is capped, so regressedCount is the authoritative total and
casesTruncated signals when the true count exceeds the returned list size.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA per-item evaluator score drop.static final recordA single regressed item, identified by its dataset item id when paired by id or by its positional index otherwise.static final recordA single evaluator's regression between baseline and candidate. -
Constructor Summary
ConstructorsConstructorDescriptionGateResult(String status, boolean passed, UUID candidateRunId, UUID baselineRunId, String pairing, Double baselinePassRate, double candidatePassRate, Double passRateDelta, boolean significant, int improvedCount, int regressedCount, int unchangedCount, int addedCount, int removedCount, List<GateResult.RegressedEvaluator> regressedEvaluators, List<GateResult.RegressedCase> cases, boolean casesTruncated) Creates an instance of aGateResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theaddedCountrecord component.Returns the value of thebaselinePassRaterecord component.Returns the value of thebaselineRunIdrecord component.doubleReturns the value of thecandidatePassRaterecord component.Returns the value of thecandidateRunIdrecord component.cases()Returns the value of thecasesrecord component.booleanReturns the value of thecasesTruncatedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theimprovedCountrecord component.pairing()Returns the value of thepairingrecord component.booleanpassed()Returns the value of thepassedrecord component.Returns the value of thepassRateDeltarecord component.intReturns the value of theregressedCountrecord component.Returns the value of theregressedEvaluatorsrecord component.intReturns the value of theremovedCountrecord component.booleanReturns the value of thesignificantrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theunchangedCountrecord component.
-
Constructor Details
-
GateResult
public GateResult(String status, boolean passed, UUID candidateRunId, UUID baselineRunId, String pairing, Double baselinePassRate, double candidatePassRate, Double passRateDelta, boolean significant, int improvedCount, int regressedCount, int unchangedCount, int addedCount, int removedCount, List<GateResult.RegressedEvaluator> regressedEvaluators, List<GateResult.RegressedCase> cases, boolean casesTruncated) Creates an instance of aGateResultrecord class.- Parameters:
status- the value for thestatusrecord componentpassed- the value for thepassedrecord componentcandidateRunId- the value for thecandidateRunIdrecord componentbaselineRunId- the value for thebaselineRunIdrecord componentpairing- the value for thepairingrecord componentbaselinePassRate- the value for thebaselinePassRaterecord componentcandidatePassRate- the value for thecandidatePassRaterecord componentpassRateDelta- the value for thepassRateDeltarecord componentsignificant- the value for thesignificantrecord componentimprovedCount- the value for theimprovedCountrecord componentregressedCount- the value for theregressedCountrecord componentunchangedCount- the value for theunchangedCountrecord componentaddedCount- the value for theaddedCountrecord componentremovedCount- the value for theremovedCountrecord componentregressedEvaluators- the value for theregressedEvaluatorsrecord componentcases- the value for thecasesrecord componentcasesTruncated- the value for thecasesTruncatedrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
passed
public boolean passed()Returns the value of thepassedrecord component.- Returns:
- the value of the
passedrecord component
-
candidateRunId
Returns the value of thecandidateRunIdrecord component.- Returns:
- the value of the
candidateRunIdrecord component
-
baselineRunId
Returns the value of thebaselineRunIdrecord component.- Returns:
- the value of the
baselineRunIdrecord component
-
pairing
Returns the value of thepairingrecord component.- Returns:
- the value of the
pairingrecord component
-
baselinePassRate
Returns the value of thebaselinePassRaterecord component.- Returns:
- the value of the
baselinePassRaterecord component
-
candidatePassRate
public double candidatePassRate()Returns the value of thecandidatePassRaterecord component.- Returns:
- the value of the
candidatePassRaterecord component
-
passRateDelta
Returns the value of thepassRateDeltarecord component.- Returns:
- the value of the
passRateDeltarecord component
-
significant
public boolean significant()Returns the value of thesignificantrecord component.- Returns:
- the value of the
significantrecord component
-
improvedCount
public int improvedCount()Returns the value of theimprovedCountrecord component.- Returns:
- the value of the
improvedCountrecord component
-
regressedCount
public int regressedCount()Returns the value of theregressedCountrecord component.- Returns:
- the value of the
regressedCountrecord component
-
unchangedCount
public int unchangedCount()Returns the value of theunchangedCountrecord component.- Returns:
- the value of the
unchangedCountrecord component
-
addedCount
public int addedCount()Returns the value of theaddedCountrecord component.- Returns:
- the value of the
addedCountrecord component
-
removedCount
public int removedCount()Returns the value of theremovedCountrecord component.- Returns:
- the value of the
removedCountrecord component
-
regressedEvaluators
Returns the value of theregressedEvaluatorsrecord component.- Returns:
- the value of the
regressedEvaluatorsrecord component
-
cases
Returns the value of thecasesrecord component.- Returns:
- the value of the
casesrecord component
-
casesTruncated
public boolean casesTruncated()Returns the value of thecasesTruncatedrecord component.- Returns:
- the value of the
casesTruncatedrecord component
-