mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#1376
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 (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2736
Originally assigned to: @SpicyMarinara on GitHub.
Summary
A post-merge verification sweep of #2730 found several low-severity robustness gaps and minor regressions in v2.0.0. None is independently game-breaking (each is recoverable, config-gated, or has an uncommon precondition), but they're grouped here so they aren't lost. Each was adversarially verified against the merged
stagingtree.1. Per-agent timeout is per-call, not cumulative (regression, hang-ish)
agentCallSignal()creates a freshAbortSignal.timeout(5min)on every call (agent-executor.ts:239).executeAgentWithToolsloops up tomaxToolRounds(default 100) and passes a newagentCallSignal()each round (:536), so a tool-using agent (Spotify, lorebook-writer) has no cumulative deadline — worst case ~100×5min. Not a true infinite hang (each call bounded; loop bounded; client disconnect aborts), but the #2730 timeout fix (commit99827f92) bounds each call, not the agent's lifetime.Fix: capture one
AbortSignal.timeout(or elapsed-time budget) once before the loop and share it across rounds.2.
chat_historyatinjectionDepth: 0flattened into depth-injection (regression, history-order corruption)#2730 commit
90ac85b6changed the depth-routing predicate atassembler.ts:356frominjectionDepth > 0to>= 0with noisChatHistoryguard. Achat_historysection configuredinjectionPosition='depth',injectionDepth=0now routes todepthSections, gets flattened into individual depth entries, losescontextKind:'history', and is re-injected at prompt end ascontextKind:'injection';findHistoryBoundsthen returns null so depth-0 lorebook/character entries mis-anchor too. Non-default config (shipped preset keeps Chat History "ordered");depth>=1was already mishandled pre-sweep.Fix: exclude
isChatHistorysections from depth routing regardless of depth:if (!resolved.isChatHistory && section.injectionPosition === 'depth' && section.injectionDepth >= 0).3. Concurrent
/game/session/concludededup leaksundefinedto the duplicate caller (regression, broken-flow)The conclude handler dedups by
chatId(game.routes.ts:4393-4394). If the in-flight request hits a JSON-parse failure it callssendJsonRepairError(reply#1, …)thenreturn;(:4540), so the shared promise resolves toundefined. The second (duplicate-click) caller getsundefinedand never sent its own reply → the repair modal never opens for the duplicate (and on Fastify 5 may hang the duplicate). Theapply-jsonsibling (:4644-4792) is structurally identical. Dedup Map added by #2730 commit09bdc806. Only the redundant duplicate click misbehaves.Fix: have the inner function return a serializable result (
{jsonRepair|error}/{summary}) instead ofreply.send + return undefined, and have the second caller re-derive/re-run when the shared promise resolvedundefined.4.
/game/setupstreams world-gen JSON with no buffered-empty retry (broken-flow on some provider stacks)setupSchema.streamingdefaultstrue(game.routes.ts:564); the handler buildssetupOptionswithstream: streaming(:3845) and the two-attempt parse/validate retry re-invokes with the same streamed options both times (:3878-3925)./game/scene-wrapdeliberately forcesstream:false+ a streamed-collection retry because some GPT-5.5/OpenAI-compatible stacks return empty content whenchatCompletestreams this JSON route./game/setuphas neither, so an empty streamed response →responseText=''→ parse throws on both attempts → 422 repair despite a world the model would produce fine buffered. Recoverable (repair modal); not a #2730 regression (streaming default predates it).Fix: mirror scene-wrap — send the world-setup completion
stream:false, or add a buffered-then-streamed cross-fallback whenresponseTextis empty before declaring a parse failure.5. Inclusion-group one-of cap not enforced across recursive scan passes (wrong-output)
applyGroupSelection(keyword-scanner.ts:349-372, invoked at:573) picks one weighted member per group but only within the current pass and carries no cross-pass state; the budgeting layer has no group awareness. In the recursion loop (index.ts:710-748) a group sibling dropped on pass 0 survives intoremainingand the next pass'sapplyGroupSelectionsees it as a singleton and lets it in — so a one-of group can inject 2+ members (A on pass 0, sibling B later), wasting context and presenting contradictory mutually-exclusive lore. Inherent design gap, not a #2730 regression.Fix: track already-selected group keys across recursion passes and exclude entries whose group is already represented from each pass's
remaining, or run group selection once over the final union.Template checklist
pnpm checkpasses (TypeScript + ESLint)chat_historysection set to depth-0 still renders inline in order/game/session/concludeclick opens the repair modal (not a blank 200)/game/setuprecovers when the provider returns empty streamed contentFound by a post-merge verification sweep of #2730 against the merged
stagingtree; each item adversarially verified. Boxes left unchecked for human verification.@SpicyMarinara commented on GitHub (Jun 21, 2026):
Addressed in PR #2747.