The Gospel Oak to Barking Line, known as the GOBLIN because rail nerds share interests with other sorts of nerds, is a remnant of London’s industrial past, running through the former industrial suburbs of London’s outer north-east. Like most of the London Overground, it’s made up of a bunch of old railways that were built for freight or as waggly commuter routes, which became utterly useless in the early 20th century when commuters shifted to the Tube and cargo shifted to vans.

Angry locals – Oh Dr Beeching! but with a London flair – kept the GOBLIN alive during these days, but it suffered from the dominance of the car and the decline of London’s population. Unlike nearly all suburban London lines, the line was never electrified. After World War II, it no longer shifted people to the heart of the city but to Hampstead, which in those days was surprisingly low on wine bars and Tesco Metros.

Privatisation didn’t help much. National Express’s Silverlink subsidiary ran the line along with its more successful electrified North London Line cousin. But as London’s population grew and businesses moved to more distant suburbs, traffic rose again, and in 2007 the Labour government shifted control of the relevant lines to Transport for London’s new London Overground.

If you’ve been on the Overground, you’ll note that its lines have excellent turn-up-and-go service with modern electric trains that are like Tube ones but better. If you’ve been on the GOBLIN, you’ll note that it doesn’t – it has 2000s diesel trains that are a bit less awful than old diesel trains but still not great, and only turn up every now and then.

As London kept growing, the obvious plan came forward: TfL and Network Rail came up with a plan to electrify the line and bring in the same kind trains that exist on the rest of the Overground, and give everyone in the north-east of the capital the same deal as people elsewhere.

But they didn’t.

The first bit was Network Rail’s fault. Like many of its recent electrification projects, it overpromised and underdelivered timings; the line was closed last year to put up new overhead wires, but they didn’t work until the end of this year. This is a systematic problem with Network Rail’s upgrade project management, which was unfortunate for all involved.

The second bit was TfL’s fault. It didn’t take the same Bombardier trains that run successfully on the rest of the Overground, but ordered some fancy new trains that are supposed to do the same thing but better in every respect. Instead of being analogue technology, they are a smart computer with a train attached.

Unfortunately, this makes them hard to debug. It’s understandable if you’ve ever sat waiting for your smartphone to upgrade so you can listen to a podcast – software is hard, and everything these days is software. But bringing software to train design is new, and one might think that the people responsible for doing this would have thought about how long it takes. At least a bit. But they didn’t.

This problem is hitting a lot of new trains in the UK (and the rest of the world) right now, across train providers – mechanical engineers and software engineers don’t quite understand each other enough. So the fancy new trains that are supposed to be better than the last generation actually aren’t. It’s hard for them to run up enough hours to even be allowed to serve in passenger service.

Under Tf’L’s original plans for the GOBLIN, this would have been OK – the current diesel Class 172s were supposed to stay until the new electric Class 710s were in power. But there’s a big shortage of diesel trains in the UK, so the Department for Transport insisted that the 172s went to the West Midlands Railway franchise to boost services around Birmingham. TfL – under the previous mayor, who you may remember from certain gameshows and zipwires – signed up to transfer the trains early.

But the trains aren’t early. Two of the eight 172s on the GOBLIN have already been sent to the West Midlands, which leaves the GOBLIN service a mess because it requires all six trains to run a peak service. TfL is desperately trying to keep the trains running day-to-day by cancelling weekend services.

The 710s are still struggling to make it into operation. And – best of all – all eight 172s are now long-term leased by West Midlands Trains, who want the lot back for the 2019 season.

If TfL doesn’t keep the old trains at the start of 2019, they’ll have to replace the whole line with a bus, which if you’ve tried to get a bus in northeast London lately, will be upsetting. But if it does keep them, then the good people of Birmingham will forgo their much-touted new service upgrade. And contractually, the trains belong to West Midlands Railway, so only a government intervention could shift them.

Will the current government intervene to save Sadiq Khan from a problem of everyone else’s making? I’m no Malcolm Tucker, but I still reckon this one is “fucking unlikely”, given how popular the mayor is among the governing party. Northeast London commuters should look forward to a winter of some discontent.