Don't worry.
Here in Oregon, CPS will NOT intervene if you have a legal MMJ card.
If the baby tests positive at birth, you will get a letter asking you not to breastfeed while you are positive, and they may (very rarely) ask to test the baby a few weeks after it's born. If the baby STILL tests positive, then maybe they will continue to be involved, but in most cases, the letter is the end of it.
I doubt California is any different.
You should not worry about it at all. The stress of worrying is far worse than anything CPS can do.
Talk to a social worker at the hospital where you plan to deliver.