           current-volatile-fact-keys (volatile-fact-keys-for-factset factset_id)
           incoming-volatile-facts (select-keys values current-volatile-fact-keys)
           incoming-stable-facts (apply dissoc values current-volatile-fact-keys)
-          incoming-stable-fact-hash (shash/generic-identity-sha1-bytes incoming-stable-facts)
+          ^bytes incoming-stable-fact-hash (shash/generic-identity-sha1-bytes incoming-stable-facts)
           fact-json-updates (if-not (Arrays/equals stable_hash incoming-stable-fact-hash)
                               ;; stable facts are different; load the json and move the ones that
                               ;; changed into volatile


      ;; Only update the paths if any existing paths_hash doesn't
      ;; match the incoming paths.
      (let [paths-hash (if-let [existing-hash (factset-paths-hash factset_id)]
                         (let [incoming-hash (-> (facts/facts->pathmaps values)
                                                 hash-pathmaps-paths)]
                           (if (Arrays/equals existing-hash incoming-hash)
                             existing-hash

  [{:keys [certname values environment timestamp producer_timestamp producer package_inventory] :as fact-data}
   :- facts-schema]
  (jdbc/with-db-transaction []
    (let [{:keys [package_hash certname_id factset_id
                  ^bytes stable_hash volatile_fact_names]}
          (certname-factset-metadata certname)

          ;; split facts into stable and volatile maps. Everything that was
