The library does not explain the foam, but it speaks to two things you asked about.
Drake recommends leaving the soil on. The recipe says not to wash the material and to use it with its own skin. (Cho, Recipe, p. 38)
Check your sugar by weight. Fruit takes close to equal weight in sugar, because it is juicier and sweeter than leafy material. (Office Hours Ep. 51, 34:01) Weigh the fruit and the sugar, then compare. (Office Hours Ep. 51, 34:01)
Unripe fruit is a sound material for this food. It is tied to the bloom stage. (Pure KNF Manual, p. 36)
The library does not say why a batch foams, how full to fill the bucket, or how to stop it once it starts.