frontend/src/lib/api.ts (2,450 lines) and apps/mobile/src/lib/api.ts (1,085 lines) are hand-maintained clients for the same FastAPI backend. They share 36 duplicated type names and 31 duplicated function names — and they already disagree about the shape of the same server response:
| type |
web |
mobile |
MmChannel |
has unread_mention_count |
has team_id |
Org |
10 fields |
5 fields |
MmFile |
18 fields |
15 fields |
HumanUser |
— |
has a token field |
At least one of each pair is wrong about the server. Seven hand-written clients speak this API in total.
The backend is FastAPI, so an OpenAPI schema is free — it is already served at /openapi.json and is authoritative enough that we used it to verify route counts (100 human, 61 agentic). Generating both clients from it removes an entire class of drift.
Realistically post-launch, but it should be a named decision rather than an accident someone rediscovers.
Found during the pre-open-source audit.
frontend/src/lib/api.ts(2,450 lines) andapps/mobile/src/lib/api.ts(1,085 lines) are hand-maintained clients for the same FastAPI backend. They share 36 duplicated type names and 31 duplicated function names — and they already disagree about the shape of the same server response:MmChannelunread_mention_countteam_idOrgMmFileHumanUsertokenfieldAt least one of each pair is wrong about the server. Seven hand-written clients speak this API in total.
The backend is FastAPI, so an OpenAPI schema is free — it is already served at
/openapi.jsonand is authoritative enough that we used it to verify route counts (100 human, 61 agentic). Generating both clients from it removes an entire class of drift.Realistically post-launch, but it should be a named decision rather than an accident someone rediscovers.
Found during the pre-open-source audit.