Record Class GateResult

java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.GateResult
Record Components:
status - PASS, FAIL, or NO_BASELINE
passed - true when the gate allows the build to proceed
candidateRunId - the gated run
baselineRunId - the resolved baseline run, or null when NO_BASELINE
pairing - how items were paired: dataset_item_id, positional, or none (NO_BASELINE)
baselinePassRate - baseline overall pass rate, or null when NO_BASELINE
candidatePassRate - candidate overall pass rate
passRateDelta - candidate minus baseline pass rate, or null when NO_BASELINE
significant - whether the pass-rate change is statistically significant
improvedCount - count of items significantly improved
regressedCount - count of items significantly regressed (authoritative total)
unchangedCount - count of items with no significant change
addedCount - count of items present only in the candidate
removedCount - count of items present only in the baseline
regressedEvaluators - evaluators flagged as significant regressions
cases - up to 50 regressed items, for the PR comment (capped)
casesTruncated - true when regressedCount exceeds the size of cases

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.

  • 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 a GateResult record class.
      Parameters:
      status - the value for the status record component
      passed - the value for the passed record component
      candidateRunId - the value for the candidateRunId record component
      baselineRunId - the value for the baselineRunId record component
      pairing - the value for the pairing record component
      baselinePassRate - the value for the baselinePassRate record component
      candidatePassRate - the value for the candidatePassRate record component
      passRateDelta - the value for the passRateDelta record component
      significant - the value for the significant record component
      improvedCount - the value for the improvedCount record component
      regressedCount - the value for the regressedCount record component
      unchangedCount - the value for the unchangedCount record component
      addedCount - the value for the addedCount record component
      removedCount - the value for the removedCount record component
      regressedEvaluators - the value for the regressedEvaluators record component
      cases - the value for the cases record component
      casesTruncated - the value for the casesTruncated record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • passed

      public boolean passed()
      Returns the value of the passed record component.
      Returns:
      the value of the passed record component
    • candidateRunId

      public UUID candidateRunId()
      Returns the value of the candidateRunId record component.
      Returns:
      the value of the candidateRunId record component
    • baselineRunId

      public UUID baselineRunId()
      Returns the value of the baselineRunId record component.
      Returns:
      the value of the baselineRunId record component
    • pairing

      public String pairing()
      Returns the value of the pairing record component.
      Returns:
      the value of the pairing record component
    • baselinePassRate

      public Double baselinePassRate()
      Returns the value of the baselinePassRate record component.
      Returns:
      the value of the baselinePassRate record component
    • candidatePassRate

      public double candidatePassRate()
      Returns the value of the candidatePassRate record component.
      Returns:
      the value of the candidatePassRate record component
    • passRateDelta

      public Double passRateDelta()
      Returns the value of the passRateDelta record component.
      Returns:
      the value of the passRateDelta record component
    • significant

      public boolean significant()
      Returns the value of the significant record component.
      Returns:
      the value of the significant record component
    • improvedCount

      public int improvedCount()
      Returns the value of the improvedCount record component.
      Returns:
      the value of the improvedCount record component
    • regressedCount

      public int regressedCount()
      Returns the value of the regressedCount record component.
      Returns:
      the value of the regressedCount record component
    • unchangedCount

      public int unchangedCount()
      Returns the value of the unchangedCount record component.
      Returns:
      the value of the unchangedCount record component
    • addedCount

      public int addedCount()
      Returns the value of the addedCount record component.
      Returns:
      the value of the addedCount record component
    • removedCount

      public int removedCount()
      Returns the value of the removedCount record component.
      Returns:
      the value of the removedCount record component
    • regressedEvaluators

      public List<GateResult.RegressedEvaluator> regressedEvaluators()
      Returns the value of the regressedEvaluators record component.
      Returns:
      the value of the regressedEvaluators record component
    • cases

      public List<GateResult.RegressedCase> cases()
      Returns the value of the cases record component.
      Returns:
      the value of the cases record component
    • casesTruncated

      public boolean casesTruncated()
      Returns the value of the casesTruncated record component.
      Returns:
      the value of the casesTruncated record component