Skip to content

epic: SSE — server-side encoding, tooling, and docs #240

Closed
2 of 2 issues completed
Closed

Description

@Oaklight

Context

sse is a 708-line, three-layer module (transport-agnostic parser, HTTP client, convenience functions) with deps = ["httpclient"]. It is client-only: consuming text/event-stream works, but producing SSE from httpserver still means hand-writing data: / event: / id: / retry: lines and the text/event-stream header.

Decision: keep sse separate from httpclient. The parser is transport-agnostic, reconnection and Last-Event-ID are protocol logic, and httpclient should stay a transport. The dependency direction (sse → httpclient) is already correct.

Workstreams

  • Server-side event encoding: encode_event, validation, tests, docs (see sub-issue)
  • Tooling and docs: make test-sse / make benchmark-sse, httpclient/httpserver cross-links (see sub-issue)

Non-goals

Acceptance criteria

  • sse can format events for httpserver without importing it.
  • make test-sse / make benchmark-sse exist and are in the aggregate targets.
  • Docs (EN/ZH) cover client + server usage and cross-link from httpclient/httpserver.
  • Encoder round-trips through EventSource.
  • Version bump (0.4.0), manifest.json, changelog.

Activity

  1. added
    enhancementNew feature or request
    area:modulesIndividual zero-dependency modules
    epicTracking epic: parent issue for a multi-issue workstream
    on Oct 23, 2026
  2. Oaklight commented on Oct 23, 2026

    @Oaklight
    OwnerAuthor

    Both workstreams landed: #241 (encoder) in #243 and #242 (Makefile + docs cross-links) in #244. The module stays separate from httpclient, as decided here.

    • sse 0.4.0 adds encode_event() / encode_comment() with multi-line normalization and validation; 12 new tests include an encoder → EventSource round-trip.
    • make test-sse (67 tests) and make benchmark-sse (6 cases) exist and are in the aggregates.
    • EN/ZH docs cover both sides, cross-linked from httpclient and httpserver; module index regenerated and make docs-index-check passes on master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:modulesIndividual zero-dependency modulesenhancementNew feature or requestepicTracking epic: parent issue for a multi-issue workstream

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions