mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3655] [Issue]: [Noodle/Logging] Refresh flow logs the outgoing prompt but never the raw model response; failed first attempts are discarded entirely #1977
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#1977
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 @stochasticbrainrot on GitHub (Jul 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3655
Originally assigned to: @SpicyMarinara on GitHub.
Here's another issue report from the professor. Skipped Discord this time because this would only paste as an attachment for some godforsaken reason.
Environment
Summary
When a Noodle timeline refresh runs with debug logging on, the console shows the full outgoing prompt but never the raw model response. Users debugging bad refreshes can see exactly what was sent but have no visibility into what came back, which makes diagnosing malformed/low-quality timeline generations needlessly painful.
This is a plain logging asymmetry in
packages/server/src/routes/noodle.routes.ts:logDebugOverride(debugMode, "[debug/noodle] Prompt sent to model:...").provider.chatComplete()returns, the rawcontentgoes straight into JSON parsing and validation with no corresponding[debug/noodle] raw responselog line.For comparison, other generation paths in the codebase (e.g. game routes, agent executor) do log raw responses in debug mode, so Noodle is the odd one out.
Expected behavior
With debug mode on, each Noodle refresh should log both the outgoing prompt and the raw model response (for the initial attempt and any retry attempts), so a bad generation can be inspected directly from the console.
Actual behavior
finishRefreshRun(runId, { status: "completed", result: content })(line ~2181) saves it tonoodle_refresh_runs.result— but that's the only place it exists, and only for the attempt that ultimately succeeded.logger.warn("[noodle] Retrying timeline generation because %s", retryReason)with the reason truncated to ~180 characters.noodle_refresh_runsrows havestatus: "completed", so the DB contains zero evidence of what the "bad" generations actually looked like — the exact thing a user is trying to debug.Steps to reproduce
[debug/noodle] Prompt sent to model:appears; no response log ever does.[noodle] Retrying timeline generation because ...warning; the offending raw response is unrecoverable afterwards.mari db list noodle_refresh_runs— only final successfulresultpayloads exist.Suggested fix (feature request)
logDebugOverride(debugMode, "[debug/noodle] Raw model response:", content)(or equivalent) immediately after eachchatComplete()call in the refresh flow — both the initial attempt and the retry path. Two-line change gated behind the existingdebugModeflag.retryReasonon the run row (e.g.failedAttemptsJSON column or afirst_result/retry_reasonpair) so bad generations can be audited after the fact instead of vanishing.Workaround
Raw responses for successful refreshes can be recovered from storage:
There is no workaround for inspecting responses that failed validation and triggered a retry — they are discarded before any logging or persistence.
Additional context
packages/server/src/routes/noodle.routes.ts(refresh flow, prompt logging ~line 1836, run completion ~line 2181),packages/server/src/services/noodle/(services themselves log almost nothing).noodle_refresh_runstable already hasprompt,result, anderrorcolumns, so persisting failed attempts is a natural extension of the existing schema.@SpicyMarinara commented on GitHub (Jul 15, 2026):
@SpicyMarinara is handling this in draft PR #3656 against staging.