feat: orchestrate deterministic growth report generation

This commit is contained in:
2026-08-21 00:26:01 +03:30
parent 6df21d4fd0
commit 027dffb59e
11 changed files with 997 additions and 156 deletions

View File

@@ -8,8 +8,12 @@ import (
func TestRequestHashIsStableAndScopeSensitive(t *testing.T) {
t.Parallel()
a := RequestHash(7, "T-1", false)
if a != RequestHash(7, "T-1", false) { t.Fatal("RequestHash() is not stable") }
if a == RequestHash(7, "T-2", false) || a == RequestHash(7, "T-1", true) { t.Fatal("RequestHash() ignored request scope") }
if a != RequestHash(7, "T-1", false) {
t.Fatal("RequestHash() is not stable")
}
if a == RequestHash(7, "T-2", false) || a == RequestHash(7, "T-1", true) {
t.Fatal("RequestHash() ignored request scope")
}
}
func TestNextTehranRefreshUsesCalendarBoundary(t *testing.T) {
@@ -18,6 +22,7 @@ func TestNextTehranRefreshUsesCalendarBoundary(t *testing.T) {
next := NextTehranRefresh(now)
location, _ := time.LoadLocation("Asia/Tehran")
local := next.In(location)
if local.Hour() != 0 || local.Minute() != 0 || !next.After(now) { t.Fatalf("NextTehranRefresh() = %s", next) }
if local.Hour() != 0 || local.Minute() != 0 || !next.After(now) {
t.Fatalf("NextTehranRefresh() = %s", next)
}
}