Risk by risk, calculation by calculation, decision by decision, the major parties are using the final sitting weeks of the 45th parliament to define the contours of the coming election battle.

Scott Morrison is hunting for a way back from electoral wipeout. Bill Shorten is looking for a way to project that he is capable of being prime ministerial.

Both leaders are looking to unite their respective bases and get them ready for the coming battle. Viewed through the prism of pure politics, that’s the story of the last 48 hours in a nutshell.

Scott Morrison suffers historic defeat as Labor and crossbench pass medevac bill Read more

Morrison has certainly endured an acute parliamentary humiliation but his objective now will be to try to translate that into an electorally productive border protection war with Labor.

Liberal party research indicates voters associate Morrison positively with “success” on stopping the boats, and that’s a card the prime minister intends to play.

Play Video 0:38 The moment the government lost the medevac bill vote – video

Shorten had to pivot on the medical evacuation bill after Morrison successfully put the opposition in a corner, but the Labor leader’s objective over the past 24 hours has been to emerge with the requisite parliamentary humiliation for Morrison, and also hold Labor’s progressive supporters together, rather than cleave the base and create circumstances allowing the Greens to recover from their internal travails and position themselves on the moral high ground at Labor’s expense.

With the eyes of the country on the parliament, on 48 hours of grim, death-match politics, both leaders framed their own tests of character.

Morrison’s was the conventional Come to Daddy pitch.

Shorten’s was more nuanced.

Morrison had sought to mow Shorten down at the National Press Club on Monday by deriding the Labor leader as a shifty exemplar of the dark arts of backroom politics – a politician who always looked to “split the difference” rather than having stable convictions and sticking with them, come what may.

Some in Labor thought that critique devastating.

Perhaps taking that cue, Shorten sought to turn his alleged weakness into a strength by embarking on a practical demonstration of deal-making with a purpose.

He set about building a parliamentary small ‘c’ coalition to get something done – a task the big ‘C’ Coalition has struggled to do during two choppy terms in government.

Having done the deal, the Labor leader then told parliament if this was a character test, he was prepared to define precisely what that was. Shorten said extending an appropriate duty of care to people in offshore detention went to the core of the Australian character.

“In fact this bill and our amendments are about Australia’s character,” Shorten told parliament, projecting calm in the high brinkmanship. “It’s about how we treat sick people in our care.”

Play Video 1:28 A test of 'Australia's character': leaders debate medical transfer bill – video

Shorten’s decision to project some basic humanity in an election year is a risk. Of course it is, given how rancid this debate is in Australia.

It is toxic.

It shouldn’t be risky. Basic morality makes it simple.

Is the medical transfer bill the hill Scott Morrison and Bill Shorten are willing to die on? | Peter Lewis Read more

A liberal democracy should not subject people who have committed no crime to a regime of indefinite detention. That regime has consequences. It is inflicting terrible harm on people, deliberately, as a matter of policy, to dissuade others from embarking on the same journey to Australia.

Morrison talks a lot about the Coalition “stopping the deaths at sea”, the implication being institutional cruelty is the price you pay for that greater good. Boat turnbacks have stopped deaths at sea, that is true – but the fact of the matter is the deaths haven’t stopped.

People in the Coalition don’t talk about that because it’s not convenient for the narrative; the asylum seekers who are still ailing, harming themselves, and dying.

Instead of dying at sea, people have died in offshore detention. They are hurting themselves because they cannot contain their despair.

The deaths haven’t stopped.

That’s just a fact, and one that shouldn’t be avoided, because that fact makes an eloquent case for why more effective medical evacuation procedures are necessary.