The rule towards out for the Bernoulli node under a Beta message,
@rule Bernoulli(:out, Marginalisation) (m_p::Beta,) = begin
@logscale 0
return Bernoulli(mean(m_p))
end
should be removed.
This forward message does not explicitly mention that the update is derived under a "tentative decision" approximation, where the integration over the parameter is replaced by the mean of the parameter.
More specifically, given a model
$$
p(\theta) = \mathcal{B}\!eta(\theta|a,b)
$$
$$
p(y|\theta) = \mathcal{B}\!er(y|\theta)
$$
the computation of the predictive distribution,
$$
p(y) = \int p(y|\theta)p(\theta) \mathrm{d}\!\theta
$$
does not give the result of the specified rule, unless the beta disttribution is approximated by a pointmass on its mean.