You mentioned you're in Scotland
You said Planning was given and building control approved everything, they just never told the council it was completed.
Red flag!!
In Scotland, the stages of a legal build are, planning permission application/ planning permission granted/ (varying amounts) of supervision by Building Control during the build. Finally, Completion Certificate. (These are all council departments)
The CC is awarded (by the council's planning and building control dept) after their final inspection to ensure that the completed building matches the PPermit and Building control standards. If the builders knew the building did not comply, they knew it would fail inspection and that's why they never told the department it was completed or applied for the CC.
We once bid for a house in what turned out to be a similar that circumstance. The house had an extension. The vendor showed planning permit and plans. My lawyer asked to see the CC, the vendor claimed to have lost it so Lawyer contacted the Planning dept to get a copy; they told him the work had failed inspection because it wasn;t up to Building Control regulations, so it had been refused a completion certificate. Vendor was furious we'd found out his lie.
This stalled the sale of the building (to us or anyone). The vendor was forced to spend a lot of money getting the work brought up to the legally required standard, and inspected and certificated.
I'd advise you to get that CC if possible. (you can apply retrospectively). It's an important part of your investment's legal standing.