feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -90,14 +90,14 @@ func TestAstraSamplingAggregationPrivacyAndFailures(t *testing.T) {
|
||||
|
||||
func TestAstraSamplingExcludesInconclusiveFromRateWithinSixHours(t *testing.T) {
|
||||
now := time.Now()
|
||||
channel := model.Channel{Id: 1, Group: "example-variable", Models: fingerprint.Model}
|
||||
channel := model.Channel{Id: 1, Group: "gpt-s-unstable", Models: fingerprint.Model}
|
||||
rounds := []AstraSamplingRound{
|
||||
{ID: "recent-match", ChannelID: 1, StartedAt: now.Add(-time.Hour).Unix(), FinishedAt: now.Unix(), Result: fingerprint.Result{Engine: fingerprint.Version, Status: "match", ValidSamples: 3, Closest: fingerprint.Model}},
|
||||
{ID: "recent-luna", ChannelID: 1, StartedAt: now.Add(-2 * time.Hour).Unix(), FinishedAt: now.Unix(), Result: fingerprint.Result{Engine: fingerprint.Version, Status: "inconclusive", ValidSamples: 2, Closest: "gpt-5.6-luna", Gap: .9}},
|
||||
{ID: "old-luna", ChannelID: 1, StartedAt: now.Add(-7 * time.Hour).Unix(), FinishedAt: now.Unix(), Result: fingerprint.Result{Engine: fingerprint.Version, Status: "inconclusive", ValidSamples: 2, Closest: "gpt-5.6-luna", Gap: .9}},
|
||||
}
|
||||
state, _ := common.Marshal(AstraSamplingState{Rounds: rounds})
|
||||
summary := AggregateAstraSampling([]model.Channel{channel}, []*model.SystemTask{{Status: model.SystemTaskStatusSucceeded, State: string(state)}}, now)["example-variable"]
|
||||
summary := AggregateAstraSampling([]model.Channel{channel}, []*model.SystemTask{{Status: model.SystemTaskStatusSucceeded, State: string(state)}}, now)["gpt-s-unstable"]
|
||||
if summary.Rate == nil || *summary.Rate != 0 || summary.Matches != 1 || summary.Mismatches != 0 || summary.Inconclusive != 1 {
|
||||
t.Fatalf("%+v", summary)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user