MiniMax M3 · 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.268
Published comments (3)
Duplicate downsize redefines signature and breaks ResizeEmoji caller — Every `ResizeEmoji` job raises `ArgumentError` because the duplicate `downsize(from, to, dimensions, opts={})` shadows the 5-arg signature used at `app/jobs/regular/resize_emoji.rb:14`. Remove the obsolete first definition so the new contract is unambiguous.
OptimizedImage.downsize called with a percentage string after signature change — `OptimizedImage.downsize` receives `"80%"` here while the new signature expects a `"WxH"` pixel string, breaking the resize loop. Add a `downsize_percentage` helper or convert the source resolution into `"WxH"` before calling.
validateUploadedFile hardcodes 10MB, ignoring per-type SiteSetting limit — `validateUploadedFile` runs for both image and attachment uploads, so a hardcoded `10 * 1024` discards `SiteSetting.max_attachment_size_kb` client-side and users only learn the cap when the server rejects the upload. Restore the `Discourse.SiteSettings['max_' + type + '_size_kb']` lookup or only apply 10MB for images.