Perfect Spectral Clustering with Discrete Covariates