fix: anchor growth forecasts to real Tehran date

This commit is contained in:
2026-08-21 18:27:40 +08:00
parent 7140213857
commit 8507b5d017
9 changed files with 306 additions and 6 deletions

View File

@@ -27,6 +27,16 @@ func TestNextTehranRefreshUsesCalendarBoundary(t *testing.T) {
}
}
func TestTehranTodayUsesClockInsteadOfDatasetWatermark(t *testing.T) {
t.Parallel()
now := time.Date(2026, time.August, 21, 8, 30, 0, 0, time.UTC)
got := tehranToday(now)
if got.Format(time.DateOnly) != "2026-08-21" {
t.Fatalf("tehranToday() = %s", got.Format(time.DateOnly))
}
}
func TestEstimatedTokenReservationCoversEveryRetryAndTurn(t *testing.T) {
t.Parallel()
small := EstimatedTokenReservation([]byte("{}"))