Gemini 3.8 Flash · Balanced
enhance-embed-url-handling-and-validation-system-discourse-cursor
Discourse · Ruby · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 1 of 12
- Comments published
- 4
- Comments matching a bug
- 1
- Comments not matching
- 3
- Cost of this PR
- $0.432
Published comments (4)
Invalid `<%- end if %>` tag causes syntax error — Rendering this view crashes with a 500 internal server error during template compilation. Replace `<%- end if %>` with `<%- end %>`.
NoMethodError when feed item lacks content element — Feeds omitting the `<content>` tag crash when `scrub` is called on `nil`. Fall back to `i.description` when `i.content` is absent before calling `scrub`.
XSS vulnerability from unescaped request.referer in script tag — A manipulated `Referer` header can execute arbitrary JavaScript in the user's browser. Sanitize `request.referer` with `escape_javascript` or serialize it with `to_json`.
Topic retrieval expectation checks synchronous execution instead of Jobs.enqueue — This test fails because `EmbedController#best` delegates topic retrieval asynchronously. Assert that `Jobs.expects(:enqueue).with(:retrieve_topic, ...)` is called instead of mocking `TopicRetriever`.