The Torah is clear on the punishment for adultery.
Leviticus 20:10
If there is a man who commits adultery with another man's wife, one who commits adultery with his friend's wife, the adulterer and the adulteress shall surely be put to death.
There is no requirement for those executing the sentence, none, according to the Torah.
John 8:7
But when they persisted in asking Him, He straightened up, and said to them, "He who is without sin among you, let him be the first to throw a stone at her”.
It would seem a fence has been created.
I don't see a fence here exactly more of a righteous judgement.
At dawn he appeared again in the temple courts, where all the people gathered around him, and he sat down to teach them.
3 The teachers of the law and the Pharisees brought in a woman caught in adultery. They made her stand before the group
4 and said to Jesus, “Teacher, this woman was caught in the act of adultery.
5 In the Law Moses commanded us to stone such women. John 8
As you quoted the law of Moses says:
Leviticus 20:10
If there is a man who commits adultery with another man's wife, one who commits adultery with his friend's wife,
the adulterer and the adulteress shall surely be put to death.
However they only brought the woman for judgement. He knew she had sinned but would not condemn her because she didn't do it alone.
Tell me the way they had been treating adultery for the ten years
prior to that case. They were acting hypocritically, and he knew it.
That case was never about the adultery, but putting him in a box;
Force him to either condemn her to death or break the law by
pardoning her.
I don't know what you mean by 'ten years'.
When he said to them 'he who is without sin' told them that they were not bringing to him a righteous case. In today's court of law it would be thrown out. No evidence.
They told him that she was caught in adultery, but adultery involves two parties. They only brought one.
It would be like someone today going before the judge with a person and saying that they assaulted another person.
There is no police record, no witnesses, no assaulted person to bring charges.
It would be thrown out of court.
Like some Police say, no body no crime.
If he had condemned her it would have been unjust as it 'takes two' to tango.
He judged righteously and perfectly inline with Torah.