A drug addict who bashed a police officer with a brick and left her for dead has been released from prison despite officials admitting he is a high risk of re-offending.