docs(orchestration): say remote rows get their own page limit

This commit is contained in:
Jinwoo-H
2026-11-10 15:45:12 -05:00
parent fb284b19ea
commit ed1b753bbf
2 changed files with 3 additions and 2 deletions
@@ -120,7 +120,8 @@ type WorkerListPage = {
/**
* Workers paired servers run for the listed Runs join the first page after this Orca's own, newest
* first and as each server last reported them; no server is asked. Every page's `total` counts
* first, at most `maxRows` of them and as each server last reported them; no server is asked. So
* the first page can hold up to twice its limit, and nothing is pushed past it. Every page's `total` counts
* them. Later pages follow this Orca's own cursor, and a terminal-state filter leaves them out,
* since only their server knows their terminals.
*/
@@ -40,7 +40,7 @@ export const ORCHESTRATION_WORKER_LIST_METHOD = defineOrchestrationMethod({
const page = await listLocalWorkerPage(runtime, params)
const paged =
params.paginate === true || params.limit !== undefined || params.cursor !== undefined
// Remote rows share the page's limit, and an unpaged list's cap for older clients.
// Remote rows get their own page limit, since later pages hold only local rows; an unpaged list keeps its cap.
const remoteRows = paged
? (params.limit ?? ORCHESTRATION_FLEET_PAGE_MAX)
: ORCHESTRATION_WORKER_LIST_SNAPSHOT_MAX_ROWS - page.workers.length