mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2416] [Issue]: 11-PROV-RUNTIME-stream-cancel-lifecycle remote streams skip unload cancellation #1183
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#1183
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?
Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2416
Originally assigned to: @Xelvanis on GitHub.
Summary
11-PROV-RUNTIME-stream-cancel-lifecyclehas remote-runtime cleanup drift: embedded Tauri streams are cancelled onpagehide/beforeunload, but remote/api/llm/streamstreams do not install equivalent unload cleanup.Expected behavior
Generation abort/cancel should stop live provider streams and clean active stream registries for both embedded Tauri and remote runtime, including page unload/navigation cleanup.
Actual behavior
The shared LLM API installs unload cancellation only after the remote branch returns. Embedded Tauri stream IDs are added to
activeTauriStreamIdsand cancelled onpagehide/beforeunload; remote streams only cancel when the passedAbortSignalfires.Steps to reproduce
llmApi.stream(...).Impact area
Environment
Logs, screenshots, or video
Static proof:
src/shared/api/llm-api.ts:59src/shared/api/llm-api.ts:73src/shared/api/llm-api.ts:22src/shared/api/remote-runtime.ts:618,src-tauri/src/http_server.rs:1237src-tauri/src/state.rs:136packages/server/src/routes/generate.routes.ts:1924,packages/server/src/routes/generate.routes.ts:11156onmainRegression notes
Legacy
/api/generatetracked active generations and aborted/removed them on close or explicit/api/generate/abort. Refactor per-stream cancellation is stronger, but remote streams lack the unload cleanup that embedded streams have.Source surface: #2410,
11-PROV-RUNTIME-stream-cancel-lifecycle.Additional context
Acceptance criteria:
/api/llm/stream/:stream_id/cancelfor active remote stream IDs.11-PROV-RUNTIME-stream-cancel-lifecyclevisible in the fix notes.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: