mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2436] [MERGED] Fix LLM stream error event parity #5607
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5607
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2436
Author: @Xelvanis
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/stream-error-contract-2415📝 Commits (2)
690db61Fix LLM stream error event parity98b077fAddress stream error review feedback📊 Changes
8 files changed (+376 additions, -39 deletions)
View changed files
📝
src/engine/generation/agent-runner.test.ts(+40 -0)📝
src/engine/generation/agent-runner.ts(+19 -3)📝
src/engine/generation/makers.ts(+18 -2)📝
src/engine/generation/start-generation.test.ts(+24 -2)📝
src/engine/generation/start-generation.ts(+11 -2)📝
src/shared/api/llm-api.ts(+81 -5)📝
src/shared/api/remote-runtime.test.ts(+166 -1)📝
src/shared/api/remote-runtime.ts(+17 -24)📄 Description
Linked issue
Closes #2415
Why this change
errorstream chunk.11-PROV-RUNTIME-stream-event-contractdrift between embedded and remote runtime paths.What changed
llm_stream_channelcommand rejections into terminaltype: "error"chunks while preserving thrownAbortErrorcancellation behavior./api/llm/streamSSEerrorchunks as yielded terminal stream events.text, stringdata, top-levelmessage/error, anddata.message/data.error.errorchunk.Refactor impact
Primary owner:
Shared API / runtime generation / engine generation.
Impact areas reviewed:
origin/mainSSE stream error behavior for parity.Boundary notes:
src/shared/api.src/engine.Pressure points touched:
src/shared/api/llm-api.tssrc/shared/api/remote-runtime.tssrc/engine/generation/start-generation.tssrc/engine/generation/agent-runner.tssrc/engine/generation/makers.tsValidation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
pnpm exec vitest run src/shared/api/remote-runtime.test.ts src/engine/generation/agent-runner.test.ts src/engine/generation/start-generation.test.tspassed: 3 test files, 30 tests.pnpm typecheckpassed.pnpm check:architecturepassed.pnpm checkpassed.origin/mainconfirmed legacy generation SSE sends terminaltype: "error"events and legacy client handling treats error events as terminal.Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
No visible UI changes. No screenshots or recordings attached.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.