Brexit: Irish Sea border issues foreseen when deal was done
On 17 October 2019 Boris Johnson was in ebullient form.
He had just sealed the Brexit withdrawal deal with the EU.
At a Brussels press conference, the prime minister hailed the agreement as marking the beginning of a "very exciting" time for the UK.
"I want to stress that this is a great deal for our country, for the UK," he said.
"And what it means is that we in the UK can come out of the EU as one United Kingdom - England, Scotland, Wales, Northern Ireland, together.
"And it means we can decide our future together, we can take back control, as the phrase goes, of our money, our borders, our laws, together."
Prescient study
Meanwhile civil servants were doing the work of turning the deal into domestic UK law - what would become the European Union (Withdrawal Agreement) Bill.
Just four days after Mr Johnson's Brussels triumph, the Department for Exiting the EU (DExEU) had produced an analysis of the Withdrawal Agreement Bill.
It is that piece of work which shows that the problems with the Irish Sea border were foreseen virtually from the moment the deal was signed.
The DExEU civil servants produced a prescient study that almost precisely describes the issues which have come into sharp focus over the past week.
The Northern Ireland part of the deal - the Protocol - keeps Northern Ireland in the EU's single market for goods and EU customs rules are enforced at its ports.
That is to prevent a hard border between Northern Ireland and the Republic of Ireland but at the expense of a new trade border within the UK.
The DExEU report was clear about what this meant: "Goods moving from Great Britain to Northern Ireland will be required to complete both import declarations and Entry Summary Declarations because the UK will be applying the EU's custom code in Northern Ireland.
"This will result in additional administrative costs to businesses.
"Businesses that do not currently trade outside the EU will incur familiarisation costs as they have not had to engage with customs processes."
'Disproportionate effects'
It went on to explain that the heaviest burden would fall on small businesses.
"The proposals will have an effect on all UK businesses that move goods between Great Britain and Northern Ireland, irrespective of the business's size.
"Economic theory suggests that a 'one size fits all' approach for business trade requirements is likely to have a disproportionate effect on small and micro businesses (SMBs) in particular.
"There would be both fixed and variable costs for firms as a consequence of the Protocol, consequently these costs are likely to be a larger proportion of SMBs' operating costs and therefore disproportionately affect them."
It is the trade in food and plant products from Great Britain to Northern Ireland that has faced the greatest disruption since 1 January.
The DExEU report devotes a lengthy section to that issue and again spelled out the implications.
"There will be additional documentation required on all agri-food goods moving from Great Britain to Northern Ireland to ensure that they comply with the necessary regulations," it stated.
"These could include Export Health Certificates for products of animal origin, fish and live animals; and phytosanitary certificates for plants.
"This would result in an additional administrative cost to businesses moving goods between Great Britain and Northern Ireland."
'Symbolically separated'
DExEU was not the only government department with a clear view of what was coming.
During the 2019 UK general election campaign the Labour Party released a leaked Treasury presentation.
The language in the document was even blunter.
It said: "The Withdrawal Agreement has the potential to separate Northern Ireland in practice from whole swathes of the UK's internal market."
It also correctly anticipated the way in which the Protocol would be perceived by many unionists: "Northern Ireland symbolically separated from the union/economic union undermined."
Northern Ireland is of little interest to most voters or journalists in Great Britain so the issue sank without trace during the election campaign.
After winning that election, the government did act to mitigate the looming impacts of the Protocol.
Some potential requirements for new processes on Northern Ireland-Great Britain trade were negotiated away in further talks with the EU.
About £500m is being spent on a Trader Support Service to help with customs and a Movement Assistance Service to help with the certification costs of agri-food goods.
There are "grace periods", meaning some of the new processes are being phased in.
But the fundamental character of the Protocol has not changed since those DExEU officials explained it all more than 15 months ago.