mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2434] [Issue]: 11-PROV-PERF-timeouts-size-streaming TTS audio cap is checked after buffering #1189
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#1189
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/2434
Originally assigned to: @SpicyMarinara on GitHub.
Summary
11-PROV-PERF-timeouts-size-streaming: Rust TTS transport checks the 20 MiB audio cap only afterresponse.bytes()buffers the whole provider response.Links back to #2410.
Expected behavior
Provider TTS audio responses should be bounded while reading, so oversized audio cannot be fully buffered before rejection.
Acceptance criteria:
MAX_TTS_AUDIO_BYTESduring the read, including chunked responses without trustedContent-Length.Actual behavior
Refactor Rust TTS sets a request timeout and has
MAX_TTS_AUDIO_BYTES, but reads the complete provider body withresponse.bytes().awaitbefore checkingbytes.len() > MAX_TTS_AUDIO_BYTES.Steps to reproduce
src-tauri/src/commands/storage/integrations/tts.rs.speakthrough provider request send.response.bytes().awaitbefore the size check.Impact area
Environment
Logs, screenshots, or video
Static trace proof only. No live provider call was run.
Regression notes
Legacy
mainused TTSsafeFetchwithmaxResponseBytes: MAX_TTS_AUDIO_BYTES, so the response cap was enforced by the fetch wrapper.Refactor evidence:
src-tauri/src/commands/storage/integrations/tts.rs:8definesMAX_TTS_AUDIO_BYTES.src-tauri/src/commands/storage/integrations/tts.rs:355sets the provider request timeout.src-tauri/src/commands/storage/integrations/tts.rs:425reads the entire response body.src-tauri/src/commands/storage/integrations/tts.rs:445checks the cap after buffering.Legacy evidence:
packages/server/src/routes/tts.routes.ts:99definesMAX_TTS_AUDIO_BYTES.packages/server/src/routes/tts.routes.ts:670sets a TTS provider timeout.packages/server/src/routes/tts.routes.ts:676passesmaxResponseBytes: MAX_TTS_AUDIO_BYTES.Additional context
Surface ID:
11-PROV-PERF-timeouts-size-streaming.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 6, 2026):
Closed on refactor with implementation in
1650f9a3and focused proof in1e2a1a11.What changed:
Verification: