Document sanity check and dependency queue calculation