The exact byte-boundary cases are a strong way to make this deterministic. I’d also assert that the client clears its selected-file preview and progress state after a 413, so a retry with a smaller file cannot reuse stale metadata. And your distinction is important: a local mock validates client behavior, while a few genuine uploads are still needed to confirm the gateway’s cap.