mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2451] [Issue]: 12-PROMPT-ERROR-invalid-empty-fallbacks: restore connection negative controls #1204
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#1204
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/2451
Originally assigned to: @Promansis on GitHub.
Summary
12-PROMPT-ERROR-invalid-empty-fallbacks: refactor generation connection resolution does not preserve legacy negative-control behavior for missing chat connections and random-pool connections.Expected behavior
Legacy stops generation when no request/chat connection is configured, and
connectionId: "random"selects from the random pool or errors withNo connections are marked for the random pool.Actual behavior
Refactor
resolveGenerationConnectionfalls back to the default/first stored connection when no request/chat connection is set. It also treats"random"as a literal connection id, so random-pool generation fails as a missing chat connection instead of using the random pool.Steps to reproduce
connectionIdand nochat.connectionId, while at least one connection exists.connectionId: "random"orchat.connectionId: "random".randominstead of selecting from the random pool.Impact area
Environment
refactorLogs, screenshots, or video
Legacy proof:
main:packages/server/src/routes/generate.routes.ts:1844handlesconnId === "random"by selecting fromconnections.listRandomPool().main:packages/server/src/routes/generate.routes.ts:1847returnsNo connections are marked for the random poolwhen the pool is empty.main:packages/server/src/routes/generate.routes.ts:1855returnsNo API connection configured for this chatwhen no request/chat connection is set.main:packages/server/src/routes/generate.routes.ts:1877returnsAPI connection not foundwhen the selected connection row is missing.Refactor proof:
src/engine/generation/context.ts:62reads the requested connection id and:63looks it up directly.src/engine/generation/context.ts:65readschat.connectionIdand:66looks it up directly.src/engine/generation/context.ts:68lists all connections and:70picks the default or first connection when no chat/request id is set.src/engine/generation/context.ts:72only errors when no stored connections exist.Regression notes
Tracked from upstream prompt assembly parity target #2442 under
12-PROMPT-ERROR-invalid-empty-fallbacks.Additional context
Acceptance criteria:
"random"connection ids select from the random pool before provider send.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: