sentineltest

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sentineltest provides test assertions for evaluation results. It lives in a separate package to avoid import cycles between the root sentinel package and the evalrun package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, stats *evalrun.ResultStats, checks ...AssertCheck)

Assert runs all checks against the result stats and fails the test if any check fails.

Types

type AssertCheck

type AssertCheck func(stats *evalrun.ResultStats) error

AssertCheck is a function that validates run result statistics. It returns an error message if the check fails, nil if it passes.

func BehaviorTriggerRate

func BehaviorTriggerRate(minScore float64) AssertCheck

BehaviorTriggerRate requires the behavior dimension score to be at least the given value.

func CognitivePhaseCompliance

func CognitivePhaseCompliance(minScore float64) AssertCheck

CognitivePhaseCompliance requires the cognition dimension score to be at least the given value.

func CommunicationMatch

func CommunicationMatch(minScore float64) AssertCheck

CommunicationMatch requires the communication dimension score to be at least the given value.

func MaxCost

func MaxCost(cost float64) AssertCheck

MaxCost requires the total cost to be at most the given value.

func MaxLatency

func MaxLatency(ms int) AssertCheck

MaxLatency requires the average latency to be at most the given value in ms.

func MinAverageScore

func MinAverageScore(score float64) AssertCheck

MinAverageScore requires the average score to be at least the given value.

func MinPassRate

func MinPassRate(rate float64) AssertCheck

MinPassRate requires the pass rate to be at least the given value.

func NoRegressions

func NoRegressions() AssertCheck

NoRegressions checks that there are no failed cases.

func PersonaCoherence

func PersonaCoherence(minScore float64) AssertCheck

PersonaCoherence requires the persona dimension score to be at least the given value.

func SkillProficiency

func SkillProficiency(minScore float64) AssertCheck

SkillProficiency requires the skill dimension score to be at least the given value.

func TraitConsistency

func TraitConsistency(minScore float64) AssertCheck

TraitConsistency requires the trait dimension score to be at least the given value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL