mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3782] [MERGED] refactor(noodle): extract public generation service #6100
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#6100
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3782
Author: @Gunterlie
Created: 7/18/2026
Status: ✅ Merged
Merged: 7/18/2026
Merged by: @SpicyMarinara
Base:
staging← Head:noodl-split-3-public-generation-seam📝 Commits (9)
e2c89farefactor(noodle): extract public generation service139786afix(noodle): preserve refresh cleanup errorsaf50d52refactor(generation): move shared runtimes into services9a386cerefactor(noodle): split public generation services55e0b58refactor(noodle): simplify generated post targetingfe93d89fix(noodle): address generation review findingsb5b188fMerge remote-tracking branch 'origin/staging' into noodl-split-3-public-generation-seam196d8affix(noodle): preserve merged generation behavior683de9afix(noodle): preserve calculated token budgets📊 Changes
30 files changed (+4160 additions, -2819 deletions)
View changed files
📝
package.json(+2 -2)📝
packages/server/src/db/schema/noodle.ts(+2 -0)📝
packages/server/src/routes/generate.routes.ts(+2 -0)📝
packages/server/src/routes/generate/generate-route-utils.ts(+23 -261)📝
packages/server/src/routes/generate/illustrator-references.ts(+1 -311)📝
packages/server/src/routes/generate/image-captioning-runtime.ts(+1 -311)📝
packages/server/src/routes/noodle.routes.ts(+34 -1826)➕
packages/server/src/services/generation/connection-base-url.ts(+13 -0)📝
packages/server/src/services/generation/conversation-selfie-command-runtime.ts(+2 -2)📝
packages/server/src/services/generation/generation-parameters.ts(+25 -1)➕
packages/server/src/services/generation/image-captioning-runtime.ts(+380 -0)➕
packages/server/src/services/generation/local-sidecar-generation-connection.ts(+83 -0)📝
packages/server/src/services/generation/media-connection-fallback.ts(+1 -1)➕
packages/server/src/services/generation/prompt-attachments.ts(+171 -0)➕
packages/server/src/services/image/illustrator-references.ts(+305 -0)📝
packages/server/src/services/image/image-generation.ts(+44 -1)➕
packages/server/src/services/noodle/noodle-generated-activity.service.ts(+404 -0)📝
packages/server/src/services/noodle/noodle-participant-selection.ts(+44 -1)➕
packages/server/src/services/noodle/noodle-public-generation.service.ts(+467 -0)➕
packages/server/src/services/noodle/noodle-public-images.service.ts(+409 -0)...and 10 more files
📄 Description
Linked issue
Closes #3781
Summary
noodle.routes.tsinto a small DB-backed coordinator plus focused prompt, profile, image, and generated-activity services.Why
POST /api/noodle/refreshpreviously acted as both the HTTP endpoint and the reusable public-generation service layer. That made the generation operation difficult to reuse safely and gave later NoodleR slices the wrong extension point.This slice resolves P2 Finding 5 for the existing public generation pipeline by establishing the invariant that routes do not own reusable generation business logic. It does not generalize the operation for capabilities that have not landed yet.
Known limitations
pnpm regressioncommand reached and passed every non-browser lane, but Playwright could not launch Chromium in the implementation environment because host-native browser libraries are missing (libnspr4, NSS, ATK, X11, GBM, and ALSA dependencies).Test plan
pnpm check.pnpm guard:installer-artifacts.pnpm regression:prompt.pnpm regression.pnpm smoke:uion a host with Playwright Chromium dependencies installed.Validation notes
A temporary deterministic script exercised the actual
POST /api/noodle/refreshroute against isolated file storage and a local OpenAI-compatible fixture before and after extraction. After normalizing generated IDs, the canonical response output was byte-identical. The temporary script was removed before commit.pnpm check,pnpm guard:installer-artifacts,pnpm regression:prompt, and all non-browser lanes inpnpm regressionpassed locally. Playwright was blocked at browser startup by missing host libraries, before any UI test assertions ran.Docs touched
None. This is an internal service extraction with no user-visible or public-contract change.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.