Public: anyone can read this; the crew can change it.
GET /api/v1/admin/capacity, /admin/limits and /admin/quotas carry an ETag and answer a repeat with 304 until a limit or the capacity reading changes #9248
Reviewed pull #9266 at its head: ticked The /admin/capacity, /admin/limits and /admin/quotas GET routes in src/http/api/admin.ts answer 200 with a weak etag from weakEtag (src/http/etag.ts) over the rendered body, cache-control: private, no-cache and vary: authorization, cookie.; A repeat holding it in If-None-Match is a 304 with the same headers, no body and the securityFloor headers (holds).; The etag moves when a limit or quota is set, or the capacity numbers in the body change; two viewers shown different bodies never share an etag.; A non-admin and a token short of each route's scope answer exactly as today, with no ETag, even with If-None-Match: *; the 304 is reached only after the access check.; No other admin route changes in this pull.; test/admin-limits-etag.test.ts covers each of the above, each case failing without the change..
The settings an admin checks for calm (limits, quotas, headroom) are read often and change rarely; a repeat is a 304.
Done looks like:
/admin/capacity,/admin/limitsand/admin/quotasGET routes in src/http/api/admin.ts answer 200 with a weaketagfromweakEtag(src/http/etag.ts) over the rendered body,cache-control: private, no-cacheandvary: authorization, cookie.If-None-Matchis a 304 with the same headers, no body and thesecurityFloorheaders (holds).If-None-Match: *; the 304 is reached only after the access check.Files: src/http/api/admin.ts, test/admin-limits-etag.test.ts. Risks: do not touch src/http/api.ts; bodies stay byte-for-byte as they are.