Summary
Three API consistency issues:
1. 14+ list endpoints without LIMIT/pagination
| Endpoint |
Risk |
handleListProjects |
Returns ALL projects |
handleListAgents |
Returns ALL agents — potentially thousands |
handleListHosts |
Returns ALL hosts |
handleListRuns |
Returns ALL runs |
handleListDeliverables |
No LIMIT |
handleListChannels |
No LIMIT |
handleListSchedules |
No LIMIT |
handleListTemplates |
No LIMIT |
handleListCommands |
No LIMIT |
| + admin variants |
|
None support cursor/offset-based pagination. On large teams, responses can be massive.
2. Dual error response format
writeErr produces {"error":"..."} (standard, used everywhere)
writeProblem in handlers_phase.go:456 produces RFC 9457: {"type":"about:blank","title":"...","status":409,"code":"...","detail":"..."} with Content-Type: application/problem+json
Two error shapes, two Content-Types, same API.
3. List wrapping inconsistency
- Most list endpoints return bare
[...]
handleListDeliverables returns {"items": [...]}
handleAdminListAgents returns {"agents": [...]}
handleAdminListAudit returns {"events": [...]}
handleListAudit returns bare [...] (same data, different contract!)
A client cannot predict the JSON shape of a list endpoint response.
Summary
Three API consistency issues:
1. 14+ list endpoints without LIMIT/pagination
handleListProjectshandleListAgentshandleListHostshandleListRunshandleListDeliverableshandleListChannelshandleListScheduleshandleListTemplateshandleListCommandsNone support cursor/offset-based pagination. On large teams, responses can be massive.
2. Dual error response format
writeErrproduces{"error":"..."}(standard, used everywhere)writeProbleminhandlers_phase.go:456produces RFC 9457:{"type":"about:blank","title":"...","status":409,"code":"...","detail":"..."}withContent-Type: application/problem+jsonTwo error shapes, two Content-Types, same API.
3. List wrapping inconsistency
[...]handleListDeliverablesreturns{"items": [...]}handleAdminListAgentsreturns{"agents": [...]}handleAdminListAuditreturns{"events": [...]}handleListAuditreturns bare[...](same data, different contract!)A client cannot predict the JSON shape of a list endpoint response.