               (assoc system key
                      (-> (get-component system key)
                          (assoc-dependencies system)
-                         (try-action system f args))))
+                         (try-action system key f args))))
             system
             (sort (dep/topo-comparator graph) component-keys))))
 

              (assoc system key
                     (-> (get-component system key)
                         (assoc-dependencies system)
                         (try-action system f args))))
            system
            (reverse (sort (dep/topo-comparator graph) component-keys)))))


(defn- assoc-dependency [system component dependency-key system-key]
  (let [dependency (get system system-key)]
    (when-not dependency
      (throw (ex-info (str "Missing dependency " dependency-key
                           " in " (.getName (class component))
                           " expected in system at " system-key)
                      {:reason ::missing-dependency
                       :system-key system-key
                       :dependency-key dependency-key
