California’s Penal Code 1001.36 was designed to help the genuinely mentally ill avoid unnecessary incarceration. But its legal architecture — a mandatory presumption the prosecution can almost never overcome, combined with a complete erasure of the arrest record on completion — creates a pathway a sophisticated defendant can exploit. Here is how it works, step…