 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     Wrappers     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;; TODO: simplify these, avoid extra stub steps when possible ?
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;     Output Collection     ;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
-
-;; TODO: collect children too ?
 (declare make-output-collecting-subproblem)
 (defn make-output-collecting-stub [inner-stub]
   (assert (not (= (first (stub-name inner-stub)) :OS)))

  (util/assert-is (= (state/current-context s1) (state/current-context s2)) "%s" [s1 s2])
  (= s1 s2))

;; TODO: is refine-input right ?
(defn make-output-collecting-subproblem [stb inner-sp]
  (let [ts  (tree-summarizer inner-sp)
        ret (traits/reify-traits ;; TODO: RI correct?
             [(simple-subproblem stb (output-set inner-sp) ts false #(refine-input inner-sp %2))]
             summaries/Summarizable (summarize [s] (summaries/or-summary s (top-down-bound ts))))]
    (connect-and-watch! ret inner-sp
      (fn child-watch [o]

        (summaries/summary-changed! ret))) ;; TODO: efficiency?
    
    ret))

(comment
  ;; Old test used this -- do we need to split on right for blocked left?
  (not (summary/live? (summaries/summary left-sp)))                                
 (not (= Double/NEGATIVE_INFINITY (summary/max-reward (summaries/summary left-sp)))))

(defn- make-pair-stub2 [subsuming-sp left-sp right-stub]
  (let [nm [:Pair (subproblem-name left-sp) (stub-name right-stub)]
