People arriving in rodent-infested hostels and having to clean blood off the mattresses and walls. Parents fleeing violence having to sofa-surf with their children. Scotland in 2023 is in the grip of a housing emergency.

Right now, in this rich nation of ours, people are to be found sleeping in cars because they have no home and no hope of being prioritised for one, or because the only B&B place available to them is so far from work, they can’t use it.

There are children absent from school for week after week because they are living in cramped B&Bs miles from school.

There are nine councils out of 32 in Scotland that can’t meet their statutory obligations to provide temporary accommodation to those who need it, so overwhelmed are they by the level of need.

Temporary accommodation is filling up with casualties of the cost of living crisis, people like the single mum supported by homelessness charity Crisis in Scotland who could only afford to use the oven once a week and had to wash her teenager and baby’s clothes by hand, so inadequate was her income to the costs she faced.

Everywhere you look – homelessness services, social housing, the private rented sector, housebuilding, first-time buyers – warning lights are flashing. Scotland’s two governments, Tory and SNP, sound unctuously concerned about everyone’s right to a safe, secure home, but there’s a yawning gap between promises and actions. Housing charity Shelter has expressed deep concern about the Scottish Government’s ability to deliver on its house-building promises, with budgets tight and the number of approvals for new social housing projects last year the worst since 2015. Local authorities, which are responsible for homelessness services, have had their finances squeezed and squeezed. The Tories’ years of austerity set the scene for these problems.

The impact on children’s education and life chances, on people’s mental and physical health and on their capacity to find and sustain work, is incalculable. It’s the issue that we should all be talking about but campaigners find themselves shouting into the wind.

It can’t go on. Earlier this week, a report by council chief executives and senior managers (SOLACE), starkly described the problem. The number of homeless people is at an all-time high and more than 9,000 children are living in temporary accommodation. In Edinburgh, the worst-hit city, children waiting for a home spend on average two years in temporary accommodation, often far from friends and school.

Read more: Humza Yousaf’s next 100 days will be even tougher

There are currently more than 243,000 people on the waiting list for social housing in Scotland but only just over a tenth of that number of social homes are allocated every year.

Half a million homes were sold off in Scotland under Margaret Thatcher’s right-to-buy legislation and social housing has suffered from chronic underinvestment since. The Scottish Government target is for 38,500 social homes to be built by 2026, but rising inflation and building costs have gouged a chunk out of the real-terms value of the housing capital budget.

This isn’t a smouldering crisis: it’s burning all around us.

The private rented sector is in no better shape. In big cities, you need a wallet full of cash to get a private flat. Rents in Edinburgh are reported by online renting portal Citylets to have risen by an average of 13 per cent in the first quarter of 2023 alone. Flat viewings for one- and two-bed flats in Scotland’s cities are often drastically oversubscribed.

This huge demand gives landlords all the power. Those in the strongest employment and financial position, able to outbid others by offering higher monthly rent, leapfrog everyone else.

The problems in housing all feed off each other. Scarcity of stock and high interest rates make mortgages unaffordable, which increases demand for rented accommodation and drives up rents. Unaffordable rents are in turn forcing tenants to turn to the social rented sector, adding to waiting lists for social housing.

Meanwhile, services supporting the homeless report that they are seeing more and more people in crisis who have never experienced homelessness before, particularly families. Energy and food costs have been the driver for this, pushing the just-managing into dire straits.

Housing used to be a key pillar of election campaigns, but that ceased to be the case long ago. In the last 15 years, education and the all-consuming NHS have taken up ever more political bandwidth and government resource, with housing and local government feeling the squeeze.

Read more: Politicians need to stop overpromising on childcare

Scotland does have a better record on housing than other home nations in certain respects, with a Crisis-commissioned report finding rates of the most acute forms of homelessness are substantially lower in Scotland at 0.57 per cent of households, than in England (0.94%) and Wales (0.66%).

But past triumphs are being rapidly overtaken by surging need. The numbers in temporary accommodation are now at an all-time high. The pressures on this broken system, which were building before the pandemic and have worsened since, are becoming intolerable.

It’s now up to politicians to take decisive action. One priority is preventing homelessness in the first place, a cheaper part of the solution than building homes and an essential one. Crisis wants action to prevent homelessness to start six months before someone faces losing their home, with public bodies working with housing professionals to ensure people don’t become homeless unnecessarily.

The Scottish Government is expected to commit to the idea in a new Housing Bill, but local government needs the funding and people to be able to implement any such plans. Holyrood has become a graveyard of good ideas, with too many well-intentioned policies expiring for being starved of funding and a realistic delivery plan.

And meanwhile, councils cannot meet targets for building new social homes if the cost of housebuilding goes up but the budget to pay for homes does not.

No one said it would be easy, but safe, secure, quality housing is key to tackling tackle child poverty, health inequalities and social deprivation. The sums involved are in the billions, but the cost of failure is massive, in cash and sheer human misery. This should be the yardstick by which all parties are judged come the next election. Who will end this misery?