Claude Sonnet 5.5 · Heavy
fix-proper-handling-of-group-memberships-discourse-cursor
Discourse · Ruby · L · 300–799 lines · 6 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 10
- Comments published
- 3
- Comments matching a bug
- 3
- Comments not matching
- 0
- Cost of this PR
- $1.373
Published comments (3)
Members endpoint now truncates non-automatic groups to 50 by default — Groups with more than 50 members now show a truncated list on the public members page, which makes one `findMembers()` call and has no paging (see `group/members.hbs`). Add paging there, or apply the default `limit` only to automatic groups. **Also found in:** - `app/assets/javascripts/discourse/routes/group-members.js.es6:8-12`
Unbounded limit and negative offset/limit accepted in group members endpoint — A huge `limit` makes the endpoint load and serialize every member of a large group, and a negative one reaches SQL as an error. Clamp `limit` between 1 and 200 and keep `offset` at 0 or above.
totalPages overcounts by one when user_count is a multiple of limit — With `Math.floor(user_count / limit) + 1`, an exact multiple like 50 members at limit 50 shows "1/2" and "next" loads an empty page. Use `Math.ceil` in `totalPages` instead.