fix: finalize growth cost controls

This commit is contained in:
2026-08-21 00:56:59 +03:30
parent bb4a85cd65
commit 3e2d1f32c8
7 changed files with 86 additions and 26 deletions

View File

@@ -26,3 +26,12 @@ func TestNextTehranRefreshUsesCalendarBoundary(t *testing.T) {
t.Fatalf("NextTehranRefresh() = %s", next)
}
}
func TestEstimatedTokenReservationCoversTwoTurnsAndGrowsWithEvidence(t *testing.T) {
t.Parallel()
small := EstimatedTokenReservation([]byte("{}"))
large := EstimatedTokenReservation(make([]byte, 1000))
if small < 3200 || large <= small || large != 5200 {
t.Fatalf("reservations small=%d large=%d", small, large)
}
}