Artin vanishing for D-modules (i.e., when is $f_+$ t-exact?) Let $f:X\to S$ be a morphism between algebraic varieties which are smooth over a field of characteristic zero. We define the (derived) direct image functor $f_+:\mathsf{D}^b(\mathcal{D}_X)\to \mathsf{D}^b(\mathcal{D}_S)$ as in basically every textbook. (That's what [HTT] denotes by $\int_f$ on page 40, for example.) This functor also restricts to $f_+:\mathsf{D}^b_\text{qc}(\mathcal{D}_X)\to \mathsf{D}^b_\text{qc}(\mathcal{D}_S)$ and $f_+:\mathsf{D}^b_\text{h}(\mathcal{D}_X)\to \mathsf{D}^b_\text{h}(\mathcal{D}_S)$.
It is true that if $f$ is a closed embedding and $M\in \mathsf{D}^b(\mathcal{D}_X)$ is concentrated in degree 0, then $\mathscr{H}^i(f_+ M)=0$ for all $i\neq 0$. [HTT, Proposition 1.5.24.]
Given that this is very close to Artin vanishing on the context of perverse sheaves, I would expect the same result as above to be true more generally for affine + quasi-finite morphisms (at least when $M$ is holonomic).
More precisely, is it true that the functor $f_+:\mathsf{D}^b_\text{h}(\mathcal{D}_X)\to \mathsf{D}^b_\text{h}(\mathcal{D}_S)$ is right t-exact (with respect to the usual t-structures) when $f$ is affine and t-exact when $f$ is also quasi-finite?
Reference: [HTT] is R. Hotta, K. Takeuchi, T. Tanisaki - D-modules, Perverse Sheaves, and Representation Theory.
 A: The functor $f_+$ by definition is the composite of a right t-exact functor (tensor product with the transfer bimodule) and a left t-exact functor (the derived pushforward of sheaves). In the case $f$ is affine, the latter functor is t-exact, so $f_+$ is indeed right-exact.
On the other hand, D-module pushforward under a quasi-finite morphism is not necessarily t-exact. For example, consider the (non-affine) open embedding $f:\mathbb A^2 - \{(0,0)\} \hookrightarrow \mathbb A^2$. I claim the pushforward $f_+(\mathcal O)$ is not concentrated in degree 0.
EDIT: I didn't catch the ``also'' in the question. It is true that when $f$ is quasi-finite, then $f_+$ is left t-exact, though I don't have an entirely straightforward argument for this.
By Zariski's main theorem, it is enough to check the cases:
(i) $f$ is an open embedding, and (ii) $f$ is finite. In case (i), $f_+$ is easily seen to be left t-exact (as the transfer bimodule is a localization, or alternatively, as the left adjoint to $f_+$ is t-exact). In case (ii), the result then follows from the main result of Raskin, noting that when $f$ is finite $f_+=f_!$ (so in particular, the pro-category is unnecessary). For holonomic modules, the finite case can be dealt with by using that $f_+$ is right exact (as $f$ is affine) and $f_+ = \mathbb D f_+ \mathbb D$. (I think the general proof follows similar lines, but requires a bit more care.)
