fix: deliver validated AI insight responses
This commit is contained in:
@@ -46,16 +46,28 @@ func TestEstimatedTokenReservationCoversEveryRetryAndTurn(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeterministicOnlyCompletionIsReady(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
status, failure := deterministicCompletion()
|
||||
if status != StatusReady || failure != "" {
|
||||
t.Fatalf("deterministicCompletion() = (%q, %q), want (%q, empty)", status, failure, StatusReady)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServiceFingerprintChangesWithDatasetAndConfiguration(t *testing.T) {
|
||||
t.Parallel()
|
||||
start := time.Date(2026, 8, 21, 0, 0, 0, 0, time.UTC)
|
||||
service := &Service{config: ServiceConfig{Model: "model-a", PromptVersion: "prompt-a", SchemaVersion: "schema-a"}}
|
||||
current := service.fingerprint(7, "T-1", "watermark-a", start)
|
||||
if current == service.fingerprint(7, "T-1", "watermark-b", start) {
|
||||
current := service.fingerprint(7, "T-1", "watermark-a", "catalog-a", start)
|
||||
if current == service.fingerprint(7, "T-1", "watermark-b", "catalog-a", start) {
|
||||
t.Fatal("dataset watermark did not invalidate fingerprint")
|
||||
}
|
||||
if current == service.fingerprint(7, "T-1", "watermark-a", "catalog-b", start) {
|
||||
t.Fatal("catalog version did not invalidate fingerprint")
|
||||
}
|
||||
service.config.PromptVersion = "prompt-b"
|
||||
if current == service.fingerprint(7, "T-1", "watermark-a", start) {
|
||||
if current == service.fingerprint(7, "T-1", "watermark-a", "catalog-a", start) {
|
||||
t.Fatal("prompt version did not invalidate fingerprint")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user