             ;; Actually, should probably add an optional client-supplied
             ;; error handler for situations like this
             (assoc state
-                   ::log/state
+                   ::log2/state
                    (log2/warn log-state
                               ::trigger-from-parent
                               "Incoming message too large"

                                    (long based-on-closed-child)))
        mid2-time (System/nanoTime)
        alt (condensed-choose-next-scheduled-time state to-child-done?)
        end-time (System/nanoTime)]
    (log/debug prelog "Scheduling considerations\n" log-message)
    (when-not (= actual-next alt)
      (log/warn prelog
                "Scheduling Mismatch!"))
    (log/debug prelog
               ;; alt approach seems ~4 orders of magnitude
               ;; faster.
               ;; Q: Is that due to reduced logging?
               (cl-format nil (str "Calculating next scheduled time took"
                                   " ~:d nanoseconds and calculated ~:d."
                                   "\nBuilding the messages about this took ~:d nanoseconds"
                                   "\nAlt approach took ~:d and calculated ~:d")
                          (- mid1-time now)
                          (long actual-next)
                          (- mid2-time mid1-time)
                          (- end-time mid2-time)
                          (long alt)))
    actual-next))

(declare schedule-next-timeout!)
(defn action-trigger


(s/def ::source-tags #{::child-> ::parent-> ::query-state})
(s/def ::input (s/tuple ::source-tags bytes?))
(s/def ::next-action-time nat-int?)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Internal API
