From ed1b753bbf3e175d8dc48caa1ced95ac25af3e54 Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Tue, 10 Nov 2026 06:03:25 -0500 Subject: [PATCH] docs(orchestration): say remote rows get their own page limit --- .../federation/remote-owned/remote-owned-reads.ts | 3 ++- .../rpc/methods/orchestration/worker/worker-list-method.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/runtime/orchestration/federation/remote-owned/remote-owned-reads.ts b/src/main/runtime/orchestration/federation/remote-owned/remote-owned-reads.ts index 49ca2accf6b..62a2c0049a4 100644 --- a/src/main/runtime/orchestration/federation/remote-owned/remote-owned-reads.ts +++ b/src/main/runtime/orchestration/federation/remote-owned/remote-owned-reads.ts @@ -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. */ diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts index 8a75adb8f7d..66f8bbabca7 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts @@ -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