Pass Privileges verses Restriction
Leaving post is a privilege, not a right. The Commander can revoke a Soldiers pass privilege to leave post overseas at his/her discretion. This is not considered restriction, it is the removal of a privilege.
Extra Duty and UCMJ
Extra duty can only be imposed as a result of the Article 15 process when you are found guilty by the commander. If you have not been read an Article 15 informing you of what charges you are accused of, then you are not pending any type of punishment. Additionally, if you were given an Article 15 and found guilty, the commander would pronounce your sentence at the same time he/she found you guilty. Restriction/extra duty normally begins the day of or the day after the sentence is imposed. The start of the restriction/extra duty can be postponed under certain circumstance, but is very rare.
Dirt bag Details
As far as the “dirtbag details” goes. If the details are during your normal duty hours and they are not demeaning in nature, there is nothing the command is doing wrong and it is not considered punishment. Most nasty details are given to the Soldiers who have screwed up. The command may be using this tactic to see how you respond and may not consider UCMJ action if you respond appropriately. Have a good attitude and tone. I know sometimes that is hard to do.