Buoyancy: integrating over a region where the fluid isn't?

On both ProofWiki and Wikipedia, the article's respective authors manage to arrive at Archimedes' principle by applying the Gauss theorem to the surface integral of the fluid's stress tensor $\sigma$: $$\oint \sigma\, \mathrm{d}\bf{A} = \int \nabla \cdot\sigma \, \mathrm{dV}$$

Nearby, it is claimed that, $$\nabla \cdot\sigma = -\rho_f \bf g$$ Where $\rho_f$ is the density of the fluid and $\bf g$ is the acceleration due to gravity. This clearly implies that $\sigma$ is meant to be the stress tensor of the fluid.

However, the volume integral is to be performed over the region where the floating object is displacing the fluid. This is strange because the fluid is not actually present in the volume where the divergence of its stress tensor is being integrated. How is it that this makes any sense?

...volume integral is to be performed over the region where ... the fluid is not actually present in the volume where the divergence of its stress tensor is being integrated.

You are correct, but it is irrelevant to the derivation of buoyancy force on the body. Here's how the argument goes:

1. Buoyancy force is determined solely by the force exerted by the fluid on the body's surface. In other words it depends only on the state of stress in the fluid (when evaluated at the body's surface).

2. If the solid body were replaced by fluid which is the same as the ambient fluid, then that replacement-fluid-body would be in equilibrium.

3. Therefore to find buoyancy force on the solid body, replace the solid body by ambient fluid and do your calculations.

Thus the manner in which divergence theorem has been used makes sense.

The weirdness here can be readily dispelled if you "extend" the stress tensor to be $0$ wherever the object isn't in the fluid. You can plausibly justify this from a physical perspective by treating the volume above the fluid as another fluid that isn't stressed/isn't under the effects of gravity.

Note that still doesn't mean $\nabla\cdot\sigma$ behaves nicely, since it has a jump at the "surface" of the fluid; but because of the linearity of integration, you can split the integral across the pathological discontinuity to get two nice integrals, one over the submerged part of the object (which gives you the end result) and another over the part not in the fluid (which evaluates to $0$).