_Comment made by: grzm_
The {{false}} value for {{:failure}} is definitely confusing. The {{stest/abbrev-result}} is *very* confounding in the {{{:failure false}}} as it doesn't provide additional information that failures usual do,as [~djebbz] points out.
{code:title=
https://github.com/clojure/spec.alpha/blob/2824ad49df8deadcb4b75acdf624e732a85b4ac7/src/main/clojure/clojure/spec/test/alpha.clj#L438-L446}
(defn abbrev-result
"Given a check result, returns an abbreviated version
suitable for summary use."
[x]
(if (:failure x)
(-> (dissoc x ::stc/ret)
(update :spec s/describe)
(update :failure unwrap-failure))
(dissoc x :spec ::stc/ret)))
Here's an example showing how misleading it can be:
(require '[clojure.spec.alpha :as s]
'[clojure.spec.test.alpha :as stest])
(alias 'stc 'clojure.spec.test.check)
(defn adder [a b]
(+ a b))
(s/fdef adder
:args (s/cat :a int? :b int?)
:ret string?)
(-> (stest/check `adder) first stest/abbrev-result)
;; => {:sym ex.check-test/adder, :failure false}
;; Writing an alternative version of `abbrev-result` that
;; checks for `true`
(defn- failure-type [x] (::s/failure (ex-data x)))
(defn- unwrap-failure [x] (if (failure-type x) (ex-data x) x))
(defn- abbrev-result [x]
(let [failure (:failure x)]
(if-not (or (true? failure)
(nil? failure))
(-> (dissoc x ::stc/ret)
(update :spec s/describe)
(update :failure unwrap-failure))
(dissoc x :spec ::stc/ret))))
(-> (stest/check `adder) first abbrev-result)
;; => {:spec (fspec :args (cat :a int? :b int?) :ret string? :fn nil),
;; :sym ex.check-test/adder,
;; :failure false}
Again, note that *any* truthy {{:failure}} value is going to provide the additional details, while falsey {{:failure}} values will not.
I understand the motivation for not changing the value of the {{:failure}} key. If that value is going to be maintained, I think {{stest/abbrev-result}} should be updated to likewise test explicitly for {{nil}} and {{true}}, rather than truthy for consistency with the result of {{stest/check}}.