    (s/optional-key :tags)          [s/Str]
    (s/optional-key :node)          {:url s/Str}})
 
-(defn matches-requirements [session-model requirements]
-  (s/validate OldRequirements requirements)
+(s/defn matches-requirements :- s/Bool
+  [session-model :- s/Any
+   requirements :- OldRequirements]
   (let [exact-match-keys [:browser-name :reserved]
         resolved-nodes (map (comp str host-resolved-url)
                             (filter identity

   :action   (s/either :add :remove)
   :tag      s/Str})

(def Requirement
  "A schema for a session requirement."
  (s/either
    (s/pair :session-tag  "type"  s/Str        "tag")
    (s/pair :node-tag     "type"  s/Str        "tag")
    (s/pair :reserved     "type"  s/Str        "reserved")
    (s/pair :session-id   "type"  s/Str        "session id")
    (s/pair :node-id      "type"  s/Str        "node id")
    (s/pair :browser-name "type"  s/Str        "browser")
    (s/pair :current-url  "type"  s/Str        "url")
    (s/pair :not          "type"  Requirement  "requirement")
    (s/pair :and          "type" [Requirement] "requirements")
    (s/pair :or           "type" [Requirement] "requirements")))

(defn maybe-bigdec [x]
  (try (bigdec x) (catch NumberFormatException e nil)))

   (s/optional-key :create) CreateArg     ; how to create, if creating
   (s/optional-key :modify) [ModifyArg]}) ; modifications to perform always

(s/defn get-or-create-session [arg]
  (let [arg (s/validate OldGetOrCreateArg (merge get-or-create-defaults arg))]
    (with-car*
      (car/return
