In the zip file, see the files toolbox/DEM/spm_COVID*
What follows is my understanding.
> what exactly is the brain doing?
This is outside my area of expertise, but it is updating brain states (whatever that turns out to mean, neural mass activity, individual neural activity), and parameters, likely candidates being neurotransmitters. The mechanism has been proposed to be message passing among hierarchical regions of the cortex.
> Where exactly is the brain minimising 'free energy'?
It is a global effect, but whenever a state or parameter are updated (again whatever those are found to be) the free energy decreases. If these turn out to be localized then that would be the (context dependent) "where".
> Can I have a testable prediction please?
The one I am most interested in is, since generative models are the core of active inference, if active inference is true then we should expect to be able to identify such models and setup conditions under which they update according to the FEP, including actions.
This is a difficult task and I suspect it will be shown in a simple biological system like C-elegans first. My own interest is in cyber-physical systems.
> If read literally, the core intuition is also false because people regularly and deliberately expose themselves to surprise, e.g. gambling, watching sports. Now there are various ad-hoc fixes to save free-energy-minimisation, but then which of them many conflicting ad-hoc fixes?
This is the dark-room argument, which as you suggest has been beat to death. I admit to not understanding what the problem is. If a system has an internal model that keeps it from exploring then it would die (of starvation). What states are surprising is all about the priors (that are designed by evolution presumably) and experience. I think it is also important to be clear that surprise is used in a very technical statistical sense.