[grid] refix cube provider ctor
[tests] included truncate_vector in common header to remove duplication