Conversation
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: PR title and empty body provide insufficient information to determine if kernel API endpoints or Temporal workflows are being modified; please add details about what files are changed. To monitor this PR anyway, reply with |
a19154d to
fc419d0
Compare
| @@ -0,0 +1,155 @@ | |||
| # External Event Ingestion + SSE Streaming — Plan | |||
|
|
|||
| **Scope:** Two new HTTP endpoints layered on top of the merged CDP base: `POST /events/capture_session/publish` (external event ingestion) and `GET /events/capture_session/stream` (SSE live stream), both wired into the existing resource-style `CaptureSession`. | |||
There was a problem hiding this comment.
i don't think the url here should be nested under capture_session. in my mind the capture session is a singleton producer the API runs / users can configure that publishes to a shared event stream that others can publish into. it doesn't own this stream
so either POST /events or POST /events/publish and GET /events or GET /evenst/stream makes more sense to me
| | Method | Path | Handler | operationId | | ||
| | --- | --- | --- | --- | | ||
| | POST | `/events/capture_session/publish` | `ApiService.PublishEvent` | `publishEvent` | | ||
| | GET | `/events/capture_session/stream` | `ApiService.StreamCaptureSession` (SSE) | `streamCaptureSession` | |
There was a problem hiding this comment.
the event stream is independent from the concept of capture session, so i would rename this to just StreamEvents or something
| | POST | `/events/capture_session/publish` | `ApiService.PublishEvent` | `publishEvent` | | ||
| | GET | `/events/capture_session/stream` | `ApiService.StreamCaptureSession` (SSE) | `streamCaptureSession` | | ||
|
|
||
| The stream endpoint follows the same singleton pattern as the other `/events/capture_session` routes. Handlers reference `s.captureSession` directly; the endpoint returns 404 when no session is active. |
There was a problem hiding this comment.
i don't think the stream endpoint should be stateful or a singleton. Many API users should be able to call this and request events starting after some time or sequence number. It's not tied to capture session, in fact capture session might not even be running
Note
Low Risk
Documentation-only change with no runtime/code behavior impact.
Overview
Adds
plans/external-events.md, a detailed implementation plan for two proposed endpoints onCaptureSession:POST /events/capture_session/publishfor external event ingestion (with validation/defaulting semantics) andGET /events/capture_session/streamfor SSE streaming (includingLast-Event-IDresume behavior and response headers).Reviewed by Cursor Bugbot for commit fc419d0. Bugbot is set up for automated code reviews on this repo. Configure here.