Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:owner/:name/labels carries an ETag and answers a repeat with 304 until a label or its open count changes #9164
Reviewed pull #9170 at its head: ticked The labels route in src/http/api/labels.ts answers 200 with a weak etag from weakEtag (src/http/etag.ts) over the rendered page, plus 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 label is added, renamed or removed, and when an issue carrying it opens or closes.; A writer and a reader get different etags when a sealed issue makes their open counts differ; a reader's etag never matches a writer's body.; A 404 or a bad page parameter carries no ETag.; test/labels-etag.test.ts covers each of the above and fails without the change..
An agent re-reading a repository's labels pays a header, not a body, while nothing changed — as the issues and pulls reads already do.
Done looks like:
etagfromweakEtag(src/http/etag.ts) over the rendered page, pluscache-control: private, no-cacheandvary: authorization, cookie.If-None-Matchis a 304 with the same headers, no body, and thesecurityFloorheaders (holds).Files: src/http/api/labels.ts, test/labels-etag.test.ts. Risks: do not touch src/http/api.ts; the body stays byte-for-byte what it is today.