Problem
In internal/clip/server.go:103-132, the temporary upload file is not closed before returning a 413 MaxBytesError.
Repeated oversized uploads can exhaust file descriptors over the lifetime of the clip server.
Acceptance criteria
- Close the temporary file on every path, including 413, copy failure, close failure, and rename failure.
- Keep cleanup idempotent and avoid double-close assumptions.
- Preserve atomic publication and temporary-file removal.
- Add a regression test that exercises repeated oversized uploads and verifies no descriptor growth or stale open files.
Problem
In internal/clip/server.go:103-132, the temporary upload file is not closed before returning a 413 MaxBytesError.
Repeated oversized uploads can exhaust file descriptors over the lifetime of the clip server.
Acceptance criteria