There's another kind of sync validation we'll need to do, and that's to ensure that these sync steps/routes are called in the proper order.  Probably a sync instance needs to keep track of which step it's on, something like:

```javascript
// Define constants for each state of the sync process
Sync.CONNECTED = 1;
Sync.STARTED = 2;
Sync.SOURCE_LIST = 3;
Sync.CHECKSUMS = 4;
Sync.DIFFS = 5;
Sync.ENDED = 6;

// The sync instance begins at 1 when constructed
function Sync(...) {
  ...
  this.state = Sync.CONNECTED;
  ...
}

// As each step is completed, the state is upgraded
function getChecksums(...) {
  ...
  this.state = Sync.CHECKSUMS;
}

// Middleware can check which state the sync is in:
if(!sync.state === Sync.CHECKSUMS) {
  res.json(401, { error: 'Checksums called out of order!'});
}
```

Something along those lines, anyway.  It lets you reason about where in the process you are at any given point, since all the calls are disconnected due to HTTP, and could be called in any order.