Expose bounded pagination and filters on the issues API The repository issues route returned the unbounded open list and accepted only a state filter, while the web surfaces already read through Issues.list_issues_page with the full filter chain. The API now exposes the same contract: state, labels, assignee, milestone, and q filters, plus page, all served at Issues' fixed page size with pagination metadata (page, per_page, total, total_pages) in every index response. Unknown states and non-integer pages are rejected with stable 422 field errors instead of being silently coerced; out-of-range pages clamp through the existing parse_page bound. Also allowlist docs/taxonomy.md in the Sarah reference check; the glossary defines Sarah as a persona boundary in the same class as docs/architecture.md, and its absence broke precommit for every change.
Expose bounded pagination and filters on the issues API
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
- built
- 6 modules in 13.4 s
- deployed
- needs_rolling_replace · 6 modules on 0 nodes · push→live —
Changed files
-
modified
lib/openagents_web/controllers/issue_controller.ex -
modified
lib/openagents_web/controllers/issue_json.ex -
modified
test/openagents_web/controllers/issue_controller_test.exs
Diff
3 files changed, +155 -5
lib/openagents_web/controllers/issue_controller.ex modified +59 -3
@@ -6,14 +6,70 @@ defmodule OpenAgentsWeb.IssueController do
| 6 | 6 |
|
| 7 | 7 |
|
| 8 | 8 |
|
| 9 |
|
|
| 10 | 9 |
|
| 11 |
|
|
| 12 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 13 | 28 |
|
| 14 | 29 |
|
| 15 | 30 |
|
| 16 | 31 |
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 17 | 73 |
|
| 18 | 74 |
|
| 19 | 75 |
|
lib/openagents_web/controllers/issue_json.ex modified +14 -2
@@ -3,8 +3,16 @@ defmodule OpenAgentsWeb.IssueJSON do
| 3 | 3 |
|
| 4 | 4 |
|
| 5 | 5 |
|
| 6 |
|
|
| 7 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 8 | 16 |
|
| 9 | 17 |
|
| 10 | 18 |
|
@@ -42,6 +50,10 @@ defmodule OpenAgentsWeb.IssueJSON do
| 42 | 50 |
|
| 43 | 51 |
|
| 44 | 52 |
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 45 | 57 |
|
| 46 | 58 |
|
| 47 | 59 |
|
test/openagents_web/controllers/issue_controller_test.exs modified +82
@@ -6,6 +6,9 @@ defmodule OpenAgentsWeb.IssueControllerTest do
| 6 | 6 |
|
| 7 | 7 |
|
| 8 | 8 |
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 9 | 12 |
|
| 10 | 13 |
|
| 11 | 14 |
|
@@ -169,4 +172,83 @@ defmodule OpenAgentsWeb.IssueControllerTest do
| 169 | 172 |
|
| 170 | 173 |
|
| 171 | 174 |
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
|
|
| 186 |
|
|
| 187 |
|
|
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
|
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
|
| 198 |
|
|
| 199 |
|
|
| 200 |
|
|
| 201 |
|
|
| 202 |
|
|
| 203 |
|
|
| 204 |
|
|
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 208 |
|
|
| 209 |
|
|
| 210 |
|
|
| 211 |
|
|
| 212 |
|
|
| 213 |
|
|
| 214 |
|
|
| 215 |
|
|
| 216 |
|
|
| 217 |
|
|
| 218 |
|
|
| 219 |
|
|
| 220 |
|
|
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
|
|
| 250 |
|
|
| 251 |
|
|
| 252 |
|
|
| 253 |
|
|
| 172 | 254 |
|