   {s/Str s/Any})
 
 (def Build
-  {:org                 s/Str
-   :project             s/Str
-   :branch              s/Str
-   :job-name-extra      s/Str
-   :job-name            s/Str
-   :org-project-branch  s/Str
-   :scheduler-type      s/Str
-   :url                 s/Str
-   :console-url         s/Str
-   :tags                [s/Str]
-   (s/optional-key :number) s/Str
+  {:org                       s/Str
+   :project                   s/Str
+   :branch                    s/Str
+   :job-name-extra            s/Str
+   :job-name                  s/Str
+   :org-project-branch        s/Str
+   :scheduler-type            s/Str
+   :url                       s/Str
+   :console-url               s/Str
+   :tags                      [s/Str]
+   (s/optional-key :number)   s/Str
    (s/optional-key :executor) s/Str
-   (s/optional-key :node) s/Str
+   (s/optional-key :node)     s/Str
    })
 
 (def SchedulerInfo
-  {(s/required-key :type     ) (s/maybe s/Str)
-   (s/required-key :url      ) (s/maybe s/Str)
-   (s/required-key :node     ) (s/maybe s/Str)})
+  {:type (s/maybe s/Str)
+   :url  (s/maybe s/Str)
+   :node (s/maybe s/Str)})
 
 (def OptsStage2
-  (merge Opts {(s/required-key :sys) BuildSystem
-               (s/required-key :logger) clojure.lang.IFn}))
+  (merge Opts {:sys    BuildSystem
+               :logger clojure.lang.IFn}))
 
 (def OptsStage3
-  (merge OptsStage2 {(s/required-key :env) Env}))
+  (merge OptsStage2 {:env Env}))
 
 (def OptsStage4
-  (merge OptsStage3 {(s/required-key :scheduler) (s/protocol Scheduler)}))
+  (merge OptsStage3 {:scheduler (s/protocol Scheduler)}))
 
 (def OptsStage5
-  (merge OptsStage4 {(s/required-key :id) s/Str
-                     (s/required-key :build) Build}))
+  (merge OptsStage4 {:id    s/Str
+                     :build Build}))
 
 (def OptsFinal
-  (merge OptsStage5 {(s/required-key :vcs) {s/Keyword s/Any}}))
+  (merge OptsStage5 {:vcs {s/Keyword s/Any}}))
 
 (def ProcessResult
-  {(s/required-key :cmd            ) [s/Str]
-   (s/required-key :cmd-source     ) s/Str
-   (s/required-key :err-accuracy   ) s/Int
-   (s/required-key :err-bytes      ) s/Num
-   (s/required-key :err-file       ) s/Str
-   (s/required-key :err-file-bytes ) s/Int
-   (s/required-key :exit-code      ) s/Num
-   (s/required-key :millis-end     ) s/Num
-   (s/required-key :millis-start   ) s/Num
-   (s/required-key :out-accuracy   ) s/Int
-   (s/required-key :out-bytes      ) s/Num
-   (s/required-key :out-file       ) s/Str
-   (s/required-key :out-file-bytes ) s/Int
-   (s/required-key :status         ) s/Str
-   (s/required-key :time-end       ) s/Str
-   (s/required-key :time-start     ) s/Str
-   (s/required-key :took           ) s/Num})
+  {:cmd            [s/Str]
+   :cmd-source     s/Str
+   :err-accuracy   s/Int
+   :err-bytes      s/Num
+   :err-file       s/Str
+   :err-file-bytes s/Int
+   :exit-code      s/Num
+   :millis-end     s/Num
+   :millis-start   s/Num
+   :out-accuracy   s/Int
+   :out-bytes      s/Num
+   :out-file       s/Str
+   :out-file-bytes s/Int
+   :status         s/Str
+   :time-end       s/Str
+   :time-start     s/Str
+   :took           s/Num})
 
 (def StoredProcessResult
-  {:cmd             [s/Str]
-   :cmd-source      s/Str
+  (assoc
+   (dissoc ProcessResult :err-file :out-file)
    :err-accuracy    s/Num
-   :err-bytes       s/Num
-   :err-file-bytes  s/Num
-   :exit-code       s/Num
-   :millis-end      s/Num
-   :millis-start    s/Num
-   :out-accuracy    s/Num
-   :out-bytes       s/Num
-   :out-file-bytes  s/Num
-   :status          s/Str
-   :time-end        s/Str
-   :time-start      s/Str
-   :took            s/Num})
+   :out-accuracy    s/Num))
 
 (def VcsLog
   {

   })

(def XML
  {(s/required-key :tag     ) s/Keyword
   (s/required-key :attrs   ) {s/Keyword s/Str}
   (s/required-key :content ) [s/Any]})

(def FailedTestCase
  {(s/required-key :error-type ) s/Str
   (s/required-key :class      ) s/Str
   (s/required-key :test       ) s/Str
   (s/required-key :stacktrace ) s/Str
   (s/required-key :summary    ) s/Str
   (s/required-key :type       ) s/Str
   (s/optional-key :message    ) s/Str})

(def TestSummary
  {(s/required-key :errors    ) s/Num
   (s/required-key :failures  ) s/Num
   (s/required-key :tests     ) s/Num
   (s/required-key :skipped   ) s/Num
   (s/required-key :failed-testcases ) [FailedTestCase]})

(def TestReport
  {(s/required-key :report-has-tests) s/Bool
   (s/optional-key :report) TestSummary})

(def StoredTestSummary

    {:build-id m/not-analyzed}}})

(def EmailCtx
  {:id s/Str
   :version VersionInfo
   :build Build
   :sys BuildSystem
   :email {:to s/Str
           :subject s/Str}
   :vcs VcsLog
   :process (merge StoredProcessResult
                   {:cmd s/Str
                    :args s/Str
                    :took-human s/Str})
   :test (s/maybe StoredTestSummary)})
