POST /uploads/:fileId/confirm only checks file ownership and current status before flipping status: 'ready'. It never calls the object store to verify the object actually exists at storageKey or matches the declared size. A file can be marked "ready" and referenced in messages that was never actually uploaded, or that doesn't match what the client claimed.
Acceptance criteria:
- The confirm handler calls the object store (a
HeadObjectCommand-equivalent method, added to lib/objectStore.ts if not already present) to verify the object exists at storageKey
- The verified object size is compared against
files.size; a mismatch is rejected rather than silently accepted
- Verification failure returns a clear error distinguishing "object not found" from "size mismatch"
- Works against both the local-disk dev object store and real S3 in production
POST /uploads/:fileId/confirmonly checks file ownership and current status before flippingstatus: 'ready'. It never calls the object store to verify the object actually exists atstorageKeyor matches the declared size. A file can be marked "ready" and referenced in messages that was never actually uploaded, or that doesn't match what the client claimed.Acceptance criteria:
HeadObjectCommand-equivalent method, added tolib/objectStore.tsif not already present) to verify the object exists atstorageKeyfiles.size; a mismatch is rejected rather than silently accepted