                                         ;; A: Well...I might need to resend it if it
                                         ;; gets dropped initially.
                                         ::vouch]))
-(s/def ::immutable-state (s/keys [::shared/my-keys
-                                  ;; Q: How do these mesh with netty's pipeline model?
-                                  ;; For that matter, how much sense does the idea of
-                                  ;; spawning a child process here?
-                                  ::chan->server
-                                  ::chan<-server]))
+(s/def ::immutable-state (s/keys :req-un [::shared/my-keys
+                                          ;; Q: How do these mesh with netty's pipeline model?
+                                          ;; For that matter, how much sense does the idea of
+                                          ;; spawning a child process here?
+                                          ::chan->server
+                                          ::chan<-server
+                                          ::server-extension]))
 (s/def ::state (s/merge ::mutable-state ::immutable-state))
 
-(declare hand-shake)
-(defrecord State [chan->child
-                  chan<-child
-                  client-extension-load-time
+(declare hand-shake initialize-immutable-state initialize-mutable-state)
+(defrecord State [chan->child       ;; Q: Where do these live?
+                  chan<-child       ;; (they don't really seem to fit here)
+                  client-extension-load-time   ; mutable
+                  ;; Q: Where does this really belong?
                   extension
-                  my-keys
-                  outgoing-message
+                  immutable         ; owns nested pieces
+                  mutable           ; Becomes an agent
+                  my-keys           ; mutable
+                  outgoing-message  ; Q: What is this?
+                  ;; Q: Where does this really belong?
                   packet-management
-                  recent
-                  chan<-server
-                  chan->server
-                  server-extension
-                  server-security
-                  shared-secrets
-                  vouch
+                  recent            ; mutable
+                  chan<-server      ; belongs under immutable
+                  chan->server      ;  ditto
+                  server-extension  ;  ditto
+                  server-security   ; mutable
+                  shared-secrets    ; mutable (build w/ handshake)
+                  vouch             ; mutable
+                  ;; Q: Where does this really belong?
                   work-area]
   cpt/Lifecycle
   (start
     [this]
-    (throw (ex-info "Start here" {:problem "hand-shake returns a deferred"}))
-    ;; Q: Does it make sense to just do the deref here?
-    ;; Nothing else matters while we're waiting for this.
-    ;; Then again, we could really have bunches of these going
-    ;; at once, so blocking a full System is a really bad idea.
-    ;; This needs more hammock time.
-    ;; After very brief consideration, agents seem almost suited
-    ;; for what needs to happen here.
-    ;; Except for nonce manipulation. That puts a major wrench in the gears.
-
-    ;; Important note:
-    ;; The reference implementation actually loops over several servers
-    ;; so we can rapidly pick the first that responds.
-    ;; This is one of the selling points over TCP, where a connection
-    ;; failure might require 3 minutes to fall back to the backup.
-    (hand-shake (assoc this
-                       :packet-management (shared/default-packet-manager)
-                       :work-area (shared/default-work-area))))
+    (let [immutable (initialize-immutable-state this)
+          mutable (agent (initialize-mutable-state immutable))]
+
+      ;; Q: Does it make sense to just do the deref here?
+      ;; Nothing else matters while we're waiting for this.
+      ;; Then again, we could really have bunches of these going
+      ;; at once, so blocking a full System is a really bad idea.
+      ;; This needs more hammock time.
+      ;; After very brief consideration, agents seem almost suited
+      ;; for what needs to happen here.
+      ;; Except for nonce manipulation. That puts a major wrench in the gears.
+
+      ;; Important note:
+      ;; The reference implementation actually loops over several servers
+      ;; so we can rapidly pick the first that responds.
+      ;; This is one of the selling points over TCP, where a connection
+      ;; failure might require 3 minutes to fall back to the backup.
+      (throw (ex-info "Start here" {:problem "Who should initiate handshake?"}))
+      ;; In a lot of ways, this doesn't make sense as a Component at all.
+      ;; Yes, it's definitely mutable boundary state.
+      ;; But their lifecycle (sorry for the pun) doesn't match System's start/stop.
+      ;; There should probably be a Component that owns a collection of these
+      ;; that handles that sort of detail.
+      ;; It's almost like I've been through this thought process before.
+      (hand-shake (assoc this
+                         :packet-management (shared/default-packet-manager)
+                         :work-area (shared/default-work-area)))))
   (stop
     [this]
+    ;; TODO: At the very least, surely I need to purge shared secrets
     this))
 
 (defn hide-long-arrays

              ;; But if we failed to send the packet at all, something is badly wrong
              (throw (ex-info "Failed to send initiate" this)))))))))

(defn ctor
  [opts]
  (map->State opts))

                                        ::outgoing-message
                                        ::shared/packet-management
                                        ::shared/recent
                                        ::server-security
                                        ::shared-secrets
                                        ::shared/work-area]
