(#3089) - WIP - add failing tests, start to fix idb