Status: Accepted (2026-11-27). Implements the API side of 0021 for the doc-worker tier (WP-G, wave 2). Contract: ServiceTokenClaims.svc = 'api'.
Queries need full documents, so doc workers answer them. They must keep a page warm in one worker, accept only internal callers, and trust the API’s authorization decision. The worker tier does not exist in wave 1.
files:read, viewer role, tenant), schema-validates the query, and checks that the page belongs to the file.LINORA_DOCWORKER_URLS. Ownership is stable, and adding a worker moves about 1/N of the pages.Authorization: Bearer <svc token>.{typ:'svc', v:1, svc:'api', fid, iat, exp: iat+60}, HMAC-signed with LINORA_TOKEN_KEYS and minted per request, only after authorization passed.svc === 'api' and check fid against the path.Retry-After, X-Linora-Seq, ETag and Cache-Control stream back without buffering. Timeout 10 s.503 unavailable (“query tier (doc workers) is not deployed yet”) with Retry-After.LINORA_INTERNAL_TOKEN): no expiry, no rotation, not bound to a file.WP-G implements GET|POST /v1/files/:fileId/pages/:pageId/<query> with the public query schemas, verifies the svc token, and handles minSeq (503 + Retry-After). No new secret is needed.