THEY call it the court’s “supervisory jurisdiction.” One of the Court of Session’s key responsibilities is ensuring that decision-makers follow the rules, reach rational decisions, give interested parties a fair hearing, and reach decisions free from bias or the appearance of bias. These are basic principles of the rule of law, basic principles of natural justice. Act within your powers. Be reasonable. Listen to the other side before reaching your conclusions. Nobody should be a judge in their own case.

Whether we’re talking about a local government licensing board, a government minister exercising statutory powers, or a civil service investigation into allegations of sexual harassment – in Scotland, the Court of Session sits as the judge over your shoulder.

READ MORE: Alex Salmond wins legal battle as Scottish Government backs down

Yesterday – after a surprise concession by the Scottish Government – Lord Pentland found their handling of the allegations of sexual harassment against Alex Salmond wanting.

But the legal basis for this decision was more restricted than some reports yesterday implied. Judicial review cases are limited – and often very expensive – remedies. Petitioners may have their legal expenses paid, but the court generally awards no damages. Instead, the impugned decision is declared unlawful.

Let’s begin by setting out what yesterday’s Court of Session decision doesn’t do. The decision does not exonerate Mr Salmond of the underlying allegations of sexual harassment – which he strenuously denies. It does not close the case or end the ongoing police investigation. It doesn’t tell us anything about whether the claims made against him are credible or not.

Curiously enough, it doesn’t even deal with Mr Salmond’s main objections to the Scottish Government’s complaints procedure. Although the detail of the legal dispute has been kept under wraps, when he launched his judicial review petition the former First Minister’s case seemed mainly to focus on the fairness of the complaints procedure itself.

“The procedure as put into operation by the permanent secretary is grossly unfair,” he said.

READ MORE: Alex Salmond vows to rejoin the SNP after legal battle win

Back in August 2018, Alex Salmond wanted conciliation, mediation and arbitration rather than engaging with the procedure adopted by the Scottish Government.

He wanted direct access to question witnesses, and access documents, he said.

The Court of Session made no determination – for or against – the merits of these arguments yesterday. Instead, its decision was limited to the question of apparent bias. Bias isn’t concerned with the inherent fairness of the Scottish Government’s protocol – but the outlook and behaviour of key decision-makers in this particular case.

And the decision-maker at the heart of this legal controversy isn’t the Permanent Secretary Lesley Evans – but the anonymous civil servant who was tasked with the responsibility of investigating the allegations against the former First Minister.

In public law, decision-makers must be free of bias. If a council planning committee turns down your planning application just because its members don’t like your politics – that’s bias. If I give judgment in your favour because you’re a close personal friend – that’s bias too. But natural justice isn’t limited to demonstrating real prejudice. That’s often extremely difficult to do. It isn’t easy to make windows into people’s souls.

So public law is also concerned with how things appear. As Lord Hope said in the leading case of Porter v Magill, from a legal perspective, the critical question is “whether the fair-minded and informed observer” would conclude that there was a “real possibility” the decision-maker was biased?

Lawyers call this “apparent bias”. Instead of making windows into their souls, we look at the decision-maker’s words and actions, and ask ourselves: does this seem right? Is there a “real possibility” the decision-maker looks partial, one way or the other?

This is the nub of yesterday’s decision in Alex Salmond’s favour. The Scottish Government conceded the civil servant’s investigation could be tainted by this impression. Reviewing the paper trail, it became apparent the functionary responsible for investigating the complaints had had prior contact with the complainers about their case. The precise nature of this contact is not in the public domain.

Instead of being an impartial bureaucrat investigating the facts without fear or favour, the Scottish Government conceded its investigator’s earlier contact with the complainers blurred the lines of impartiality.

It accepts it failed to treat both sides of the complaints process in a way which looked even-handed in the eyes of the law. In a case of this sensitivity and significance, this was a remarkable failure.