Skip to content

chore(core): drop obsolete StreamSse hunk from effect patch - #41892

Merged
kitlangton merged 1 commit into
v2from
drop-sse-patch-hunk
Aug 12, 2026
Merged

chore(core): drop obsolete StreamSse hunk from effect patch#41892
kitlangton merged 1 commit into
v2from
drop-sse-patch-hunk

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Removes the StreamSse hunk from patches/effect@4.0.0-beta.101.patch, leaving only the Deferred cleanup guard. Net: -57 lines of patch, two OpenAPI components renamed to their upstream-canonical names.

Why the hunk is obsolete

The hunk dates to #34171 (June 27): at beta.83, Schema.fromJsonString's encoded wrapper inherited the decoded schema's identifier, so the SSE transport wrapper stole V2Event's OpenAPI component name and the real union got renamed V2Event1. The hunk worked around it by pinning the wrapper to ${identifier}Stream.

Upstream accepted this as their bug (effect-smol#2496, filed citing opencode) and fixed it more generally in effect-smol#2512 (merged July 1, shipped since beta.93): fromJsonString now names its encoded wrapper ${identifier}JsonString at the transformation boundary. The vendored beta.101 already contains that fix — the hunk's only remaining effect was renaming the wrapper components away from what every other Effect user sees.

Blast radius

  • V2EventStreamV2EventJsonString, SessionLogItemStreamSessionLogItemJsonString in the served OpenAPI spec
  • Zero TypeScript references to either name repo-wide; the only committed occurrence is the codemode fixture, renamed in step
  • Payload components (V2Event, SessionLogItem) unaffected — their protection is upstream's fix, verified by upstream tests
  • Maintenance win: this exact hunk had stale line offsets that made bun fuzz-apply it mid-overload-signature, shipping syntactically broken TS into the vendored src on every install (repaired in fix(core): guard Deferred waiter cleanup in vendored effect patch #41858). Fewer hunks, fewer regenerations per effect bump.
  • Endgame: the patch file now carries only the Deferred guard (upstream PR in flight) — it deletes entirely at the next effect version bump.

Testing

  • Fresh bun install --force: patch applies cleanly; Deferred guard present; SSE code pristine upstream
  • Booted the server from this branch: /openapi.json serves V2EventJsonString/SessionLogItemJsonString, payload components intact
  • packages/codemode: 1089/1089 tests pass against the renamed fixture

The hunk pinned the SSE transport wrapper's OpenAPI identifier to
${identifier}Stream. Upstream accepted the underlying bug (effect-smol
issue #2496, filed from opencode PR #34171) and fixed it more generally
in effect-smol #2512 - Schema.fromJsonString now names its encoded
wrapper ${identifier}JsonString - shipped since 4.0.0-beta.93. The
vendored beta.101 already contains that fix, so the hunk's only
remaining effect was renaming the canonical wrapper components.

Adopt the upstream names: V2EventStream -> V2EventJsonString and
SessionLogItemStream -> SessionLogItemJsonString. No TypeScript code
references either name; the only committed occurrence is the codemode
OpenAPI fixture, renamed in step. The payload components (V2Event,
SessionLogItem) are unaffected.

Leaves the patch carrying only the Deferred cleanup guard, which is
pending upstream - the file deletes entirely at the next effect bump.
@kitlangton
kitlangton enabled auto-merge (squash) August 12, 2026 01:09
@kitlangton
kitlangton merged commit 96a74ff into v2 Aug 12, 2026
12 of 14 checks passed
@kitlangton
kitlangton deleted the drop-sse-patch-hunk branch August 12, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant