Three years ago, a report from grid operator Transpower landed on Beehive desks.
It carried a serious warning.
"Under the base-case scenario, New Zealand's exposure to supply shortages in winter and dry years is expected to grow from 4 TWh today, which is comfortably covered by hydro storage andthermal generation capacity, to 9 TWh by 30 and 12 TWh by 2050."
Well, it's more or less a warning of what happened on Monday, where a cold winter night pushed demand for electricity through the roof - to the point that there was no longer enough electricity being generated.
The report should be put in perspective.
The fact that electricity demand spikes on cold winter nights is nothing new - and besides, it appears that Monday's snafu was the consequence of a series of unlucky screw-ups rather than a chronic lack of planning.
There was enough capacity in the system to generate more electricity - however a series of screw ups meant that electricity wasn't brought online.
The fact that the Government and the electricity companies might be able to justifiably avoid accountability in this instance shouldn't get any of them off the hook should something like this happen in the future - as it certainly will.
Our Government - like governments around the world - is upending the electricity sector in response to the threat of climate change. This is at the same time as it adds far more demand to the electricity network by incentivising people to buy EVs and electrify heavy industry.
So what does Transpower plan to do? Well, the report from two years ago (since updated with a 2020 version) made some alarming predictions.
The first is that annual demand for electricity will double between 2015 and 2050 from 41 TWh to 88 TWh. A fair whack of that additional demand comes in the first decade - with demand increasing from 44 TWh in 2020 to 57 TWh in 2030.
Transpower thinks this will require 37 new wind farms, 20 hydro plants, 20 geothermal projects, 10 marine projects and nine solar by 2050. A lot of building, in other words.
But the additional generation is only one part of it.
One thing Monday night showed is that the grid doesn't just need a decent base load, it needs the ability to quickly increase that generation on a cold night.
This is possible using fossil fuels - particularly gas. Additional coal generation takes hours to switch on, but additional gas is more or less instant, making it ideal for managing peak demand.
Again, the Government was warned this would be an issue in that report, which said that while "several potential technical solutions have been identified" to the peaking problem "none appears definitely feasible and economically attractive".
Transpower said the Government could opt to continue using gas to manage peak demand, but this was counter to government policy - and if gas continued to be used, new gas peaking plants would need to be built to complement the ones that already exist, prolonging the use of fossil fuels in the system.
So the choice for the Government isn't as simple as keeping gas online for as long as its needed. It's between turning it off too early or too late. There's no right answer.
One thing the Government has now (which it did not in 2018) is a plan to investigate building what is essentially an enormous battery in the South Island, which would help alleviate peaking concerns such as this.
However it won't be ready for use this decade - and remember the risk of winter generation shortages is expected to double between now and 2030 as reliable fossil fuel peaking switch off and unreliable renewable base load is added to the system.
If there are further incidents like the one that occurred on Monday, the Government will quite rightly cop flak for choking off gas generation without having any substitute waiting in the wings.
The 2018 report estimated winter evening peak supply will need to hit 15 GW by 2030 (from about 9-10GW today), and will need to double to 20 GW by 2050. That's an awful lot of generation.
This is made worse by the fact the renewable energy we're likely to build is notoriously unreliable. Transpower thinks that the increase of generation from sources like solar will only increase the risk of winter peaks.
The other concern for our electricity generators is how to add additional generation that has to be cheap. New Zealand has to electrify vast swathes of its economy without bankrupting households and businesses.
Somehow forcing companies to keep loads of generation idle would have averted a crisis - but is it worth forcing households to pay for idle generation every other night of the year to avert a rare crisis?
There comes a point where building in additional contingency to the system ends up making it overly expensive at a time when people and businesses need every incentive to electrify more of their activities.