fix(archive): classify libvips sequential-JPEG SOS errors as corrupt source (BIT-31700) #132

Merged
spark merged 1 commits from task/BIT-31700-vips-sos-corrupt-source into main 2026-10-29 11:12:25 +00:00
Owner

VipsJpeg: Invalid SOS parameters for sequential JPEG is another shape of the same truncated/corrupted cloud-archive JPEG that premature end and corrupt header already cover. isCorrupt SourceMessage did not match it, so it fell through to the generic failure path and reached the error hub as a warning instead of being marked corrupt_source at info level.

Fixes the gap reported by BIT-31700 and its recurrence BIT-31919 (same signature, different source file).

  • Added Invalid SOS parameters to the regex in apps/api/src/archive/corrupt-source.ts
  • Added a regression test case in corrupt-source.test.ts

Tested: DATABASE_URL_TEST=... npx vitest run src/archive/corrupt-source.test.ts (5 passed) and tsc --noEmit clean, after rebasing onto current main.

`VipsJpeg: Invalid SOS parameters for sequential JPEG` is another shape of the same truncated/corrupted cloud-archive JPEG that `premature end` and `corrupt header` already cover. `isCorrupt SourceMessage` did not match it, so it fell through to the generic failure path and reached the error hub as a warning instead of being marked `corrupt_source` at info level. Fixes the gap reported by BIT-31700 and its recurrence BIT-31919 (same signature, different source file). - Added `Invalid SOS parameters` to the regex in `apps/api/src/archive/corrupt-source.ts` - Added a regression test case in `corrupt-source.test.ts` Tested: `DATABASE_URL_TEST=... npx vitest run src/archive/corrupt-source.test.ts` (5 passed) and `tsc --noEmit` clean, after rebasing onto current main.
spark added 1 commit 2026-10-29 11:04:38 +00:00
fix(archive): classify libvips sequential-JPEG SOS errors as corrupt source (BIT-31700)
ci / rust (pull_request) Successful in 3m51s
ci / typescript (pull_request) Successful in 7m31s
b540ab447b
VipsJpeg: Invalid SOS parameters for sequential JPEG is another shape of the
same truncated/corrupted cloud-archive JPEG that premature end and corrupt
header already cover; isCorruptSourceMessage didn't match it, so it fell
through to the generic failure path and reached the error hub as a warning
instead of being marked corrupt_source at info level.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-31700
Paperclip-Run: 6435a4c4-0daa-41c4-8641-a0431c981ee8
spark merged commit b1561da69a into main 2026-10-29 11:12:25 +00:00
Sign in to join this conversation.