This should specify a spec whose generator always returns collections of size 4 or 5 but instead it generates collections of size 4 to 8:
(require '[clojure.spec.alpha :as s] '[clojure.spec.gen.alpha :as gen])
(map count (gen/sample (s/gen (s/coll-of char? :min-count 4 :gen-max 5))))
;; (4 7 8 8 4 7 4 5 5 7)
Cause: The max logic in s/every-impl is: }. If there is a max-count it's used, otherwise the larger of gen-max or 2min-count is used. In this case, 2min-count is 8. Seems like we should never generate more than gen-max though, so propose changing this logic to: }.
Patch: clj-2202.patch