P3-05: /precedents endpoint returns ALL precedents unbounded — no pagination #23

Closed
opened 2026-06-16 13:57:02 +00:00 by Artur · 0 comments
Owner

Severity: P3 (Low)
File: decider/server.py line 189

Problem

elif self.path == "/precedents":
    ...
    results = _decider_instance.prec.search("")
    self._json(200, {"count": len(results), "precedents": results})

prec.search("") returns ALL precedents with no limit. With hundreds of precedents, this payload grows unbounded.

Fix

Add query parameters for pagination:

  • ?limit=20&offset=0 (or ?page=1&per_page=20)
  • Default limit of 50
  • Include total count and next/prev links
**Severity**: P3 (Low) **File**: `decider/server.py` line 189 ## Problem ```python elif self.path == "/precedents": ... results = _decider_instance.prec.search("") self._json(200, {"count": len(results), "precedents": results}) ``` `prec.search("")` returns ALL precedents with no limit. With hundreds of precedents, this payload grows unbounded. ## Fix Add query parameters for pagination: - `?limit=20&offset=0` (or `?page=1&per_page=20`) - Default limit of 50 - Include total count and next/prev links
Artur closed this issue 2026-06-16 14:24:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow-all/decider#23
No description provided.