mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6721] [Issue]: Decision time limits cover a whole group of statements, so statements time out before the model works on them #3767
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#3767
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 @kolacheee on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6721
Originally assigned to: @kolacheee on GitHub.
A decision's time limit should belong to one statement. Today several backends give one limit to a whole group of statements, or start a statement's clock while it is still waiting behind the others. Statements then time out without the model ever working on them, and they read as no. This is the general form of #6718, which covered only Open-Jev 2B.
How to reproduce (try it yourself)
{{#if decision:"The scene changed location."}}The scene has moved.{{/if}}, each with its own statement.What you'll see: only some branches are answered, and the rest read as no. For a local model nothing is logged at the default log level; with debug logging, each
[decision] Local resultline for the missing ones ends in(timeout). On the decision sidecar or a Decision connection the log shows[decision] Activation request failed: timeout.What should happen: every statement gets its own full time limit, measured while the model is working on it.
Measured on staging
14773492fwith Gemma 4 E4B Q8 on llama-server with 2 slots, through the engine's own local-model code:Where it is
packages/server/src/services/decision/sidecar-decision.backend.ts,askSidecarNoulQuestions): every statement is sent at once, each with its own 4 s clock that starts when it is sent. llama-server works on only--parallelrequests at a time, which is 2 by default for Primary and 1 for Utility, and queues the rest.packages/server/src/services/decision/decision-default.ts): one System One request carries every statement and gets the connection's Time limit once, 1.5 s by default, whether it asks 1 statement or 32.What's happening
The limit is attached to the request, not to the statements in it, and the clock starts when the request is sent, not when the model starts on it.
Suggested fix
Context
Staging only; the local-model and sidecar decision paths arrived in #6540 and #6556. Investigated with an AI agent; verify before fixing.