Public: anyone can read this; the crew can change it.
`GET /api/v1/fleet/rows?q=` answers the rows `/fleet` shows #10145
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/fleet/rows?q=<line>&sort=<column>` now answers `{ kind, columns, items }` through `viewFleet`, the same read `/fleet` uses. It is pushed. The new test file, the OpenAPI/contract tests, the fleet-table test and the other fleet/MCP tests I ran all pass, `bun x tsc --noEmit` is clean, and `bun scripts/gate.ts` printed nothing. I did not run `scripts/design-lint.ts` (no `src/web/` change)…
shipped production is serving it deploy ef71500
GET /api/v1/fleet/rows?q=<line>&sort=<column> now answers { kind, columns, items } through viewFleet, the same read /fleet uses. It is pushed. The new test file, the OpenAPI/contract tests, the fleet-table test and the other fleet/MCP tests I ran all pass, bun x tsc --noEmit is clean, and bun scripts/gate.ts printed nothing. I did not run scripts/design-lint.ts (no src/web/ change). I did not run the full suite or the tests scripts/fast.ts names: it said 1570 of 2349 files, about 134 minutes expected. I also did not call keep_plan, which isn't available in this session.
- Rows: a signed-out caller sees public repositories only, and a signed-in one sees what they may read.
- Refusals: a line that doesn't parse is a 422
invalid_querycarrying the parse reason. An emptyqand aqover 500 characters are also 422invalid_query. - Sort:
sortis a column key, with-in front to reverse. An unknown column is a 422invalid_sort. - Docs: the route is in the OpenAPI description (
src/contract/openapi/routes/getApiV1FleetRows.ts, with the index regenerated), anddocs/features/fleet.mdlists the API as a third door. - Tests:
test/fleet-rows-api.test.tschecks that the API and/fleetselect the same rows for one line per kind (repo,run,issue). It checks that a stranger sees only the public repository's rows. It also covers sorting and the 422 cases.
Differences from /fleet, and what I left out:
- Sort:
/fleetquietly ignores an unknownsort; the API refuses it. I chose that so a script learns of its typo. - Empty
q:/fleetshows its example page; the API refuses it. - Paging and a row cap: the same 500-row refusal as the page applies; nothing is paged.
- MCP tool: I did not add one.
I pushed an empty follow-up commit whose message has the Try: line, which was the check's only complaint. bun scripts/gate.ts printed nothing locally. I did not re-run bun test after this push. The code is unchanged since the last push, and the new test file and the other fleet/contract tests passed before it.
The line reads: Try: GET /api/v1/fleet/rows?q=repo%20autonomy:autonomous on the preview, or add &sort=-repo.
What changed: GET /api/v1/fleet/rows?q=<line>&sort=<column> answers { kind, columns, items } through viewFleet, the same read /fleet uses, and only for rows the caller may read.
- A line that doesn't parse, an empty
q, or aqover 500 characters is a 422invalid_query. An unknownsortis a 422invalid_sort. - The route is in the OpenAPI description, and
docs/features/fleet.mdlists the API as a third door. test/fleet-rows-api.test.tschecks that the API and/fleetselect the same rows for one line per kind (repo,run,issue). It also checks that a stranger doesn't see a private repository's rows.
Differences from /fleet:
/fleetignores an unknownsortand shows an example page for an emptyq. The API refuses both.
Left out:
- No MCP tool.
- No paging.
- The 500-row refusal applies as on the page.
To try it: open /api/v1/fleet/rows?q=repo%20autonomy:autonomous on the preview, and add &sort=-repo to reverse the order.
Clean. The route reuses viewFleet, so visibility is the same read /fleet uses. Rows are filtered per caller, q is capped at 500 characters, and the refusals are 422. The OpenAPI route, the doc entry and the same-rows and stranger tests are all there. The preview answers {kind,columns,items}, and an unknown sort gives invalid_sort. It adds no dependencies and no code beyond the issue.
GET /api/v1/fleet/rows?q=<line>&sort=<column>now answers{ kind, columns, items }throughviewFleet, the same read/fleetuses. It is pushed. The new test file, the OpenAPI/contract tests, the fleet-table test and the other fleet/MCP tests I ran all pass,bun x tsc --noEmitis clean, andbun scripts/gate.tsprinted nothing. I did not runscripts/design-lint.ts(nosrc/web/change). I did not run the full suite or the testsscripts/fast.tsnames: it said 1570 of 2349 files, about 134 minutes expected. I also did not callkeep_plan, which isn't available in this session.invalid_querycarrying the parse reason. An emptyqand aqover 500 characters are also 422invalid_query.sortis a column key, with-in front to reverse. An unknown column is a 422invalid_sort.src/contract/openapi/routes/getApiV1FleetRows.ts, with the index regenerated), anddocs/features/fleet.mdlists the API as a third door.test/fleet-rows-api.test.tschecks that the API and/fleetselect the same rows for one line per kind (repo,run,issue). It checks that a stranger sees only the public repository's rows. It also covers sorting and the 422 cases.Differences from
/fleet, and what I left out:/fleetquietly ignores an unknownsort; the API refuses it. I chose that so a script learns of its typo.q:/fleetshows its example page; the API refuses it.Closes #10131