It turns out our existing manager test was testing the slightly wrong thing - it simulated only that both the kernel and the base fail at the same time. I added a test that tests this issue now in https://github.com/snapcore/snapd/commit/6a260bc5cdf7452d19f087214b4484e84e17cfab and I see the problematic behavior with that now too - i.e. that the "base" is set to try and the new core20 that is still set as base got removed from the system.
It turns out our existing manager test was testing the slightly wrong thing - it simulated only that both the kernel and the base fail at the same time. I added a test that tests this issue now in https:/ /github. com/snapcore/ snapd/commit/ 6a260bc5cdf7452 d19f087214b4484 e84e17cfab and I see the problematic behavior with that now too - i.e. that the "base" is set to try and the new core20 that is still set as base got removed from the system.