Claude Sonnet 5.5 · Heavy
feature-automatically-downsize-large-images-discourse-cursor
Discourse · Ruby · S · 30–99 lines · 3 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 3 of 8
- Comments published
- 3
- Comments matching a bug
- 3
- Comments not matching
- 0
- Cost of this PR
- $0.957
Published comments (3)
Duplicate downsize definition overrides first and breaks 5-argument callers — The second `downsize` definition replaces the first, so the existing 5-argument caller in `resize_emoji.rb` raises `ArgumentError`. Keep a single `downsize` that accepts both forms, or update that caller to pass "100x100".
Percentage resize with allow_animation fails for GIFs so downsizing loop never shrinks — gifsicle rejects a percentage resize, so `downsize` returns false and `tempfile` never shrinks across all 5 attempts, leaving oversized animated GIFs untouched. Pass `allow_animation: false` here and break out of the loop when `downsize` returns false.
Client-side upload size check ignores max_attachment_size_kb setting — The hardcoded 10MB limit skips the per-type `max_attachment_size_kb` setting, so oversized attachments pass the client check and only fail after upload. Use the site setting for non-image types and apply the 10MB cap only when `type` is an image.