Illustration: John Shakespeare If the House were still sitting for another week, they'd have dragged it out for another week. If another month, another month. All the parties were equally guilty of gamesmanship. Much of the emotion in the House was sheer relief that they could escape Canberra on schedule. Their real deadline had nothing to do with the rights of gay and lesbian couples. It had everything to do with their Christmas and holiday plans. Second, the Parliament ended the year with the eligibility of its members in doubt. How many remain in the Parliament unconstitutionally? We still don't know. The dual citizenship debacle has now been running for four months and three weeks without any clear resolution in sight. A second batch of parliamentarians this week was referred to the High Court, their status in the balance. Still others probably need to be sent to the court for a decision next year. Another year will begin in 2018 with this national failure continuing to wear down the people's confidence in the competence of the Parliament.

Illustration: Jim Pavlidis Parliament is Australia's ultimate problem-solving mechanism. When it's broken, problems accumulate. In this case, it's proved woefully slow and inadequate to the task of fixing itself. Once again, the parties have put partisan jousting ahead of problem solving. And, in the culminating disgrace for 2017, the Parliament adjourned with Sam Dastyari remaining a sitting Australian senator. Malcolm Turnbull's government is leaving Canberra under a citizenship cloud. Credit:Lukas Coch Most people had the impression that Bill Shorten got rid of Dastyari already. Last year, in fact, after Fairfax Media revealed that his donor and sponsor, billionaire Huang Xiangmo​, had paid his bills while Dastyari was asserting the policies of the Chinese Communist Party over those of his own party and his own country.

So Australians were surprised to hear that, when Dastyari latest outrage was exposed last week, he was still a senator. This time, Fairfax Media revealed he'd advised Huang on how to avoid surveillance by Australia's intelligence agencies. And that he'd lied about a speech he'd given in support of China's territorial claims to maritime areas also claimed by China's neighbours. Each time Dastyari has been caught out, the Labor leader has had the same response. He chastises Dastyari, he removes him from his extra positions and appointments, announces that he's "sacked" him, and then allows him to remain a senator representing the Labor Party. "He has put me in a position where I have to sack him again," Shorten said last week. Only because you keep promoting him, Bill, when you should have disendorsed him. So Shorten last week removed him as deputy opposition Senate whip and as chair of a committee, but kept him on as a Labor senator. Malcolm Turnbull has called on Shorten to strip him of Labor endorsement: "This is a senator who has made it abundantly clear that his first allegiance is not to Australia." But Shorten's rejoinder is: "What law has he actually broken?" And here's the rub. As far as anyone has been able to tell us, Dastyari's disgraceful and disloyal sellout is perfectly legal. How can that be so? Because the laws are inadequate. . A reasonable person might be astonished to learn this, but it's true. Dastyari broke no law. His sellout to a donor was contemptible. It was a betrayal of his party, his people, his country. But unless he has the honour to resign, or Shorten has the decency to disendorse him, he can remain a senator, complete with all the powers and privileges that bestows.

Why won't Shorten sack him? Because Shorten is terrified of alienating Dastyari's faction, the NSW Labor Right faction, lest it turn against him. He fears for his job. The government has referred Dastyari to the privileges committee of the Senate, which has the power to punish senators who break the Senate's rules. It can hand out a $5000 fine or six months in jail. This is an attempt to pressure Dastyari out. But the committee is composed of other senators, including Labor ones. They might punish him, or not, depending on the political deals of the day. Like a US congressional impeachment, it's not a judicial mechanism but a political one. And even here, nothing can happen until Parliament resumes in February. The solution? Australia needs to toughen its legal protections against corruption. Including corruption by foreign powers. To its credit, the government is well advanced on this agenda. Only about an hour after the same-sex marriage bill had passed and the House emptied, Turnbull went to the dispatch box and announced to the bare handful of MPs who had remained to keep the chamber running:

"Today I'm introducing legislation to counter the threat of foreign states exerting improper influence over our system of government and our political landscape. When "Duncan Lewis says the threat from espionage and foreign interference is 'unprecedented' then we know that we must act. The director-general is telling us that the threat we face today is greater than when Soviet agents penetrated the federal government during World War II and the early years of the Cold War." He presented some of the legislation that the government is using to achieve three things. First, it's moving to ban foreign political donations. ASIO told the political parties that Huang had close ties to the Chinese Communist Party. The party has a department, the United Front Work Department, specifically tasked with influencing foreign countries to accept the party's viewpoint and to serve China's interests. It works quietly, primarily through Chinese citizens living abroad, like Huang. Australia's political parties proved too greedy and venal to act on ASIO's warning. Even after the specific warning from the intelligence agency's chief, Duncan Lewis, the parties continued eagerly taking Huang's money, and not only the Labor Party - Labor took $141,000 from Huang affiliates, the Liberals $122,960 and the Nationals $15,000. And we know Huang wasn't donating in support of lofty democratic ideals. "The Australian Chinese community is inexperienced in using political donations to satisfy political requests," he wrote in a Chinese language newspaper last year. He called for "a more efficient combination between political requests and political donations."

Huang, who lives in Sydney's Mosman, is a permanent resident but not a citizen. The government's proposed ban on foreign donations will outlaw any more Huang money for the political parties. Second, the government is updating Australia's laws on espionage and sabotage, including acts of cyber sabotage. Turnbull again: "Our espionage laws are so unwieldy they have not supported a single conviction in decades, even as the threat reaches unprecedented levels." Current laws cover only acts of sabotage against defence facilities. The proposed laws would make it illegal to, for instance, plant a piece of computer code designed to crash the electricity grid or the banking system, punishable by up to 15 years in jail. Third, the new law would force into the open anyone trying to do the bidding of a foreign power. Or go to jail. Or as Turnbull put it, "if a person or entity engages with the Australian political landscape on behalf of a foreign state or principal then they must register accordingly." This isn't designed to shut down debate, he said, but to "apply the basic principles of disclosure". Just as they apply to domestic lobbyists.

This requirement to register could cover former politicians who hold positions with foreign firms if they advocate on the behalf of those firms' home countries, including the former Liberal trade Andrew Robb and former Labor prime minister Paul Keating. This is all vitally important. But while the government is advancing this effort to protect Australia against foreigners, it needs to go further - it needs to protect Australia against its own Parliament. The Parliament has just demonstrated anew its own dismal inability to manage itself. Every Australian state has an anti-corruption commission. The federal level of government needs one too, urgently. A federal anti-corruption commission should be modelled more closely on Victoria's Independent Broad-based Anti-corruption Commission than NSW's Independent Commission Against Corruption, and can learn from the mistakes of the state-level bodies. But at the level of government where the stakes are highest, the sums of money biggest, and the risks greatest, the protections are the weakest. Such a commission would have power to investigate the politicians but also the vast federal bureaucracy. Some 80 per cent of the people want an independent, federal anti-corruption commission. The Greens, Nick Xenophon Team and Derryn Hinch​ strongly support one too. Labor says it would agree if the government were to support it.

The government, however, is the obstacle. It's still in denial. A federal ICAC or IBAC is inevitable - the only question is whether the government acts positively to create one and gets the credit, or whether a future scandal forces it to act and it gets no credit. "Based on what I've seen and as a taxpayer, I think a federal anti-corruption commission will find a lot of stuff that is of concern," says the outgoing head of the Victorian IBAC, Stephen O'Bryan​. "I could guarantee it. I would bet my house on the fact it will have a very busy first decade, a federal body." Loading The federal Parliament is in disgrace. Public confidence is at an all-time low. An anti-corruption body isn't sufficient to restore the people's trust, but it's an indispensable part of the solution. Parliament can congratulate itself when it's shown that it can behave itself, regulate itself and cleanse itself. Peter Hartcher is the political editor.