It has happened to me as well.
"It's my decision", she said. "There is no appeal." Even while I was still there, sitting on the ground (per the CBSA officer's order), I was thinking "I'm going to have to submit a complaint." So later, at home, I did.
The first response from the Minister was business-like. It told me that they'd conducted an investigation, that I'd been in violation of the law, that the officer had been correct, that the officer's conduct had been appropriate. I wrote back, with many verifiable details, asking that they re-investigate.
It took a long time, but the second letter from the Minister had a very different tone, compared to the first. It apologized. It told me that they'd re-investigated, and that it had included the video and audio recording of our interaction. It informed me that my account (of what happened) was consistent with the evidence, the officer's account was inconsistent with the evidence, that the officer had been informed of their findings, and that a memo had been generated, CBSA-wide, to educate their staff.
The next time I was through, and I recognized the officer in the booth, I was thinking "Okay... here we go.." but nothing happened. If she remembered anything, she didn't let it show.