when something says "use up until day of harvest " they're generally talking about things that can be washed off well, veggies and shit.
Not something we're gonna smoke.
I quit using anything that even can be considered toxic/harmful at over three weeks( I use pyrethrins mainly) from harvest.
There's several solutions out depending on the bug you want to destroy.
Mighty wash I would use up until the day I harvest IF I thought I had to which at that point is kinda silly since the mites will leave the plant on their own after chop.
They'll more than likely try to find and carry on with any other plants you may have in the area.
If it's systemic it will usually stay in the plant a varying time depending on the chem. Some stick around for 50 days in the plant.
Azamax(which is systemic) stays in the plant a couple weeks or better if I remember right.
It contains the active ingredient that's found in neem oil.
Depending on what bug you are fighting there are safer alternatives.
Remember, Azamax does go systemic but I don't remember details on how long it's in the plants system.