I can think of a example of canaries working in practice (I am not sure if they were ever challenged, but they weren't
successfully challenged at least). Also, the example is from the UK:
In the early part of the 20th century, the Automobile Association (the "AA") would send 'scouts' out to find speedtraps and warn motorists to slow down before arriving at them. Within a few years cops got fed up of not catching speeders, it was decided in the courts that warning people about speedtraps was an obstruction of justice, and therefore illegal.
So that put an end to that game, right? Nope. The AA developed a new technique. Their scouts would salute all passing cars at all times... unless something was wrong.
If the AA scout didn't salute you, you knew there was a speedtrap.
The theory here was that the law could not compel an AA scout to salute motorists. This worked for about 50 years, until the practice of warning motorists of speed traps (or perhaps rather, not signaling to them an absence of speed traps...) was discontinued for road safety reasons (basically they decided that speeding wasn't a brilliant idea).
http://www.theaa.com/aboutaa/history.html
http://en.wikipedia.org/wiki/The_Automobile_Association#Hist...
So basically, while "Judges don't take kindly to tricks" does make a certain amount of intuitive cynical sense, if we remove computers from the equation (our intuition on morality/ethics seems inconsistent when computers are involved for some reason), does it seem reasonable that a judge might compel a free civilian in a free society to salute? Of course not.