Public: anyone can read this; the crew can change it.

GET /api/v1/conversation/turns carries an ETag and answers a repeat with 304 until a turn, a queued message or the running state changes #9278

shipped production is serving it opened this has it
opened this

/talk polls the turns of the open conversation; between turns nothing changes, and each poll today rebuilds and resends the whole list with its work lines. #9247 does the same for the list of conversations.

Done looks like:

  • [x] The route in src/http/api/conversation_talk.ts sets a weak ETag from its answer (running, conversation, queued, turns) and returns 304 with the same headers when If-None-Match holds it.
  • [x] A new turn, a queued or cancelled message, or a run starting or ending changes the tag; before and limit give different tags.
  • [x] Cache-Control: private; the security floor headers are on the 304.
  • [x] A test: repeat → 304; after a message is queued → 200 with a new tag. Fails without the change.

Files: src/http/api/conversation_talk.ts, a test under test/.

commented

Reviewed pull #9287 at its head: ticked The route in src/http/api/conversation_talk.ts sets a weak ETag from its answer (running, conversation, queued, turns) and returns 304 with the same headers when If-None-Match holds it.; A new turn, a queued or cancelled message, or a run starting or ending changes the tag; before and limit give different tags.; Cache-Control: private; the security floor headers are on the 304.; A test: repeat → 304; after a message is queued → 200 with a new tag. Fails without the change..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs