               {:keys [clean dirtied still-dirty]} 
                 (util/group-by (fn [[s r]] (classify-result-type r (:min-cycle-depth (:entry (meta s))) cutoff-depth-map))
                           new-results)]
-          (swap! (:result-map-atom node) (partial merge-safe >=) (into {} clean))
-
-          (when (= (first (env/action-name (:action node))) 'nav)
-            (let [[_ dx dy] (env/action-name (:action node))]
-              (doseq [[ss sr] (stitch-effect-map clean state 0 #_ reward-to-state)]
+          
+          (swap! (:result-vec-and-map-atom node)
+                 (partial reduce (fn [[ve m :as p] [k v :as p2]]
+                                   (if-let [ov (get m k)]
+                                     (do (assert (>= ov v))
+                                         p)
+                                     [(conj ve p2) (assoc m k v)])))
+                 clean)
+
+;          (println (apply str (repeat depth \ )) (count clean) (count dirtied) (count still-dirty))
+;          (when (= (first (env/action-name (:action node))) 'nav)
+;            (let [[_ dx dy] (env/action-name (:action node))]
+;              (doseq [[ss sr] (stitch-effect-map clean state 0 #_ reward-to-state)]
 ;                (println ss sr clean new-results (env/action-name (:action node)))
-                (let [[sx sy] (map #(env/get-var state %) '[[atx] [aty]])]
-                  (when-not (= (- sr) (+ (util/abs (- sx dx)) (util/abs (- sy dy))))
-                     (println [sx sy] [dx dy] sr (:min-cycle-depth (:entry (meta ss))) reward-to-state) #_ (dr/debug-repl))))))
+;                (let [[sx sy] (map #(env/get-var state %) '[[atx] [aty]])]
+;                  (when-not (= (- sr) (+ (util/abs (- sx dx)) (util/abs (- sy dy))))
+;                     (println [sx sy] [dx dy] sr (:min-cycle-depth (:entry (meta ss))) reward-to-state) #_ (dr/debug-repl))))))
           
           (doseq [entry (concat good-roots (map #(:entry (meta (key %))) dirtied))] 
             (assert (util/xor (not (:sanode entry)) (:cutoff (meta entry))))

    (do (assert (pred (get m k) v)) m)
    (assoc m k v)))

(defn merge-safe [pred & maps]
  (apply merge-with (fn [x y] (assert (pred x y)) x) maps))


(defn extract-effect [state context opt]

              (- (or (:cutoff (meta entry)) (:reward-to-state entry))))) ;(if-let [n  (:sanode entry)] (cutoff (:queue n)) 0)
          (.remove stack-node-depths node) ;; TODO: catchup!! 
;          (println "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoff" cut (cutoff good-queue) "and cdm" cutoff-depth-map "and states" (count new-results) (count catchup) "-" (count clean) (count dirtied) (count still-dirty) "and good roots" (count good-roots) (map :reward-to-state good-roots))
;          (println (apply str (repeat depth \ )) "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoffs" cut (cutoff good-queue) ", ns"  (util/map-keys spos (stitch-effect-map catchup state reward-to-state) ) (count catchup) (count new-results))   
          (assert (<= (cutoff good-queue) init-cutoff))
          
          (PartialResult (stitch-effect-map 
                           (into {} (map (fn [[s r]] [(vary-meta s assoc :cycle-depth 
                                                        (final-cycle-depth r (or (:cycle-depth (:entry (meta s))) 
