Public: anyone can read this; the crew can change it.
The OpenAPI description says GET /api/v1/telemetry/flow carries an ETag and max-age and answers a matching If-None-Match with 304 #9093
Reviewed pull #9097 at its head: ticked The route file declares alsoStatus: [304]. Its summary says the read carries an ETag and a max-age, and that a repeat sending If-None-Match inside that window gets 304 with no body, in the plain words getApiV1ForgesSizes.ts uses ("cacheable by ETag").; The served OpenAPI document shows 304 among this operation's responses. If the generator does not yet render alsoStatus, make it render it for every route that sets it, rather than special-casing this one.; A test reads the served OpenAPI JSON and expects a 304 response on get /api/v1/telemetry/flow. The same test, or the existing test/flow-cache.test.ts, asserts that the live route still answers 304 to its own etag, so the description and the behaviour are held together. The new assertion fails without the change.; bun test passes..
Intent: an agent that reads the OpenAPI document learns from it that the flow read can be revalidated. Today only
docs/FLOW.mdsays so.#9070 made
GET /api/v1/telemetry/flow(src/http/api.ts) sendetag,cache-control: private, max-age=Nandvary: authorization, cookie, and answer a matchingIf-None-Matchwith an empty 304.src/contract/openapi/routes/getApiV1TelemetryFlow.tsstill describes a plain 200 and mentions none of this.Done looks like:
alsoStatus: [304]. Its summary says the read carries an ETag and a max-age, and that a repeat sendingIf-None-Matchinside that window gets 304 with no body, in the plain wordsgetApiV1ForgesSizes.tsuses ("cacheable by ETag").alsoStatus, make it render it for every route that sets it, rather than special-casing this one.get /api/v1/telemetry/flow. The same test, or the existingtest/flow-cache.test.ts, asserts that the live route still answers 304 to its own etag, so the description and the behaviour are held together. The new assertion fails without the change.bun testpasses.Files expected:
src/contract/openapi/routes/getApiV1TelemetryFlow.ts, perhaps the OpenAPI builder insrc/contract/openapi/, one test.Risks: #9087 (OpenAPI limit bounds) is in flight on the same generator. Keep this change to the route file and the response list so the two merge cleanly. Do not change the route's behaviour.
Fits: scout or torque.