The boundary layer of a finite domain [a, b] covers mesoscopic lateral neighbourhoods, inside [a, b], of the endpoints a and b. The correct diagnostic of the integrand behaviour at a and b, based on its sampling inside the boundary layer, is the first from a set of hierarchically ordered criteria allowing a priori Bayesian inference on efficient mesh generation in automatic adaptive quadrature.