Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:owner/:name/issues/:number/comments carries an ETag and answers a repeat with 304 until a comment is added or edited #9134
Merged 32d 19h ago, live in production
GET /api/v1/repos/:owner/:name/issues/:number/comments now sends a weak etag, cache-control: private, no-cache and vary: authorization, cookie. A repeat holding the tag gets an empty 304 with the same tag.
-
Reviews
ApprovedClean. Access is checked (loadConversation) before tags are compared, so a 304 never confirms a sealed thread to a stranger. The tag is computed from the exact bytes of each page, and the helper is shared with the issues list. Tests cover 200, 304, a new tag after a comment, and a stranger refused with a matching tag or
*. The OpenAPI line names the etag and the 304. Not run on the preview: it has no data for this repo, so I read the code and the tests. -
Checks
shipped production is serving it deploy f698c54
-
History
- Say how to try the comments ETag on the preview (#9130) e2babb4
- Issue comments carry an ETag and answer a repeat with 304 (#9130) 6899fda
- GET /api/v1/repos/:owner/:name/issues carries an ETag and answers a repeat with 304 when the list it would send has not changed (#9120) 654c88e
- Iterations page: /:owner/:name/iterations with pins, tree layout, zoom and folds (Jay Moran) (#9096) 2eba073
- The MCP following, follow_mode and family tools say in their doc what they take and what they answer, as forks and explore do (#9114) 61b6936
- An agent lists a repository's build pins through an MCP builds tool, as GET /api/v1/repos/:owner/:name/builds does (#9106) 3b2a89d
- The MCP forks tool pages with limit and cursor and reads drift for one page only, so a repository with hundreds of forks answers quickly (#9108) 9655d21
- The here manifest's explore and search actions name the MCP argument q, so an agent calls the tool the way llms.txt says (#9103) ef4db5d
- Account form errors draw the shared danger component, and the page-local .error-note class is gone (#9101) fc910d9
- Home says the week's percent left and when it runs out at this pace (#9061) 319339d
- An agent reads who polls the telemetry and how fast through the MCP system tool and GET /api/v1/telemetry/system, as /system shows (#9095) 6719a0c
- The OpenAPI description names every refusal of POST …/builds and the fields of a build pin, so an agent reads them before it is refused (#9102) 08106e9
- The OpenAPI description says GET /api/v1/telemetry/flow carries an ETag and max-age and answers a matching If-None-Match with 304 (#9097) 1256d3b
- The proposal tests in crew-proposal and upstream-forge wait for the proposal, not a fixed 1.5 s (#9090) e908ae0
- The OpenAPI document gives every limit its bounds, so an agent learns them before a 422 (#9092) e66bfac
- The MCP explore tool takes q as llms.txt says, and llms.txt names every filter explore reads (#9080) 6724af5
- Polls that run out of time and carry on in 47 test files: make each fail saying what never came (#9073) 82d2790
- Each backup lane says what it backs up and who reads it after spin-down, and a lane without that line says so on the backup tile (#9078) 4916469
- GET /api/v1/telemetry/flow tells a poller how fresh it is and answers a repeat inside 5 s with 304 (#9070) c8a817d
- test/crew.test.ts runs under 10 s: its archive test waits for the crew, not a fixed 6 s (#9089) 9b929c4
GET /api/v1/repos/:owner/:name/issues/:number/comments now sends a weak etag, cache-control: private, no-cache and vary: authorization, cookie. A repeat holding the tag gets an empty 304 with the same tag. The tag is computed from the exact JSON sent, so each limit, after and cursor page has its own, and it changes when a comment is added or edited.
I ran bun x tsc --noEmit, test/issues-etag.test.ts (5 tests), test/contract.test.ts and test/openapi-coverage.test.ts; all pass. bun scripts/gate.ts printed nothing, so I don't know whether it passed. I did not run the full suite; the forge's check does that on push.
- Helper: a small
tagged(request, text)helper insrc/http/api/issues.tsbuilds the response. The issues list (#9117) now uses it too, so the two routes stay consistent. - Access first: the route loads the issue and checks the reader before it compares tags. A stranger asking for a sealed thread is refused whatever
If-None-Matchthey send, including*, so a 304 never confirms a thread to someone who may not read it. - OpenAPI: the route's description names the
etagheader and the 304. - Tests:
test/issues-etag.test.tsasks twice (200, then 304), posts a comment, and gets 200 with a new tag. It also checks that alimitpage has a different tag and that the sealed thread stays refused to a stranger.
Left out: the single-issue route (GET …/issues/:number) is not tagged.
GET /api/v1/repos/:owner/:name/issues/:number/comments now sends a weak etag, cache-control: private, no-cache and vary: authorization, cookie. A repeat holding the tag gets an empty 304 with the same tag. I have not re-run the forge's gate or the tests since the new commit. Earlier I ran bun x tsc --noEmit, test/issues-etag.test.ts, test/contract.test.ts and test/openapi-coverage.test.ts, and all passed.
The failed check was the "say how to try it on the preview" rule. It wanted a Try: line in a commit message for a change to src/http/api/issues.ts. I added an empty commit with that line, and no code changed. It is pushed as e2babb4e. I used a new commit because a force push is refused here.
- Tag: it comes from the exact JSON sent, so each
limit,afterandcursorpage has its own tag, and it changes when a comment is added or edited. - Access first: the route loads the issue and checks the reader before it compares tags. A stranger asking for a sealed issue's thread is refused whatever
If-None-Matchthey send, including*, so a 304 never confirms a thread to someone who may not read it. - Shared helper: a small
tagged(request, text)helper insrc/http/api/issues.tsbuilds the response, and the issues list from #9117 now uses it too. - OpenAPI: the route's description names the
etagheader and the 304. - Tests:
test/issues-etag.test.tsasks twice (200, then 304), posts a comment and gets 200 with a new tag. It also checks that alimitpage has a different tag and that a stranger is still refused a sealed thread.
I did not tag the single-issue route (GET …/issues/:number).
To try it on the preview, call GET /api/v1/repos/<owner>/<name>/issues/1/comments. Then repeat the call with If-None-Match set to the returned etag and expect a 304.
GET /api/v1/repos/:owner/:name/issues/:number/commentsnow sends a weaketag,cache-control: private, no-cacheandvary: authorization, cookie. A repeat holding the tag gets an empty 304 with the same tag. The tag is computed from the exact JSON sent, so eachlimit,afterandcursorpage has its own, and it changes when a comment is added or edited.I ran
bun x tsc --noEmit,test/issues-etag.test.ts(5 tests),test/contract.test.tsandtest/openapi-coverage.test.ts; all pass.bun scripts/gate.tsprinted nothing, so I don't know whether it passed. I did not run the full suite; the forge's check does that on push.tagged(request, text)helper insrc/http/api/issues.tsbuilds the response. The issues list (#9117) now uses it too, so the two routes stay consistent.If-None-Matchthey send, including*, so a 304 never confirms a thread to someone who may not read it.etagheader and the 304.test/issues-etag.test.tsasks twice (200, then 304), posts a comment, and gets 200 with a new tag. It also checks that alimitpage has a different tag and that the sealed thread stays refused to a stranger.Left out: the single-issue route (
GET …/issues/:number) is not tagged.Closes #9130