The spring has a height of 1m and spring constant k. The weight has a mass, m. The weight compresses the spring by 0.5m. If we take the table height to be the zero of gravitational potential energy, then the work done on to the spring, by the weight, is:

$W=-F\cdot \mathrm{\Delta}h=mg(0.5\phantom{\rule{mediummathspace}{0ex}}\text{m}-1\phantom{\rule{mediummathspace}{0ex}}\text{m})=\frac{1}{2}mg$

My question is: What is the work done on to the weight by the spring?

If we keep the conventions the same (spring is system, weight is surroundings), then the spring should be doing negative resistive work on to the weight while it's lowering.

In other words, shouldn't the work actually b