great observation! yes, ideally progress would be reported after the bytes have been transferred. However, this would involve plumbing the callback down into the subtransport, as it is the component that knows when the bytes have actually been delivered. I will move the callback after the call to stream-write returns, but even this does not mean that the bytes have been delivered (the stream implementation can chunk the bytes, for example).

This is a great improvement that can be made later on without disrupting the current progress API - and consumers of the progress API would just start getting more accurate data.