mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2198] [Issue]: Lorebook Maker drops parse-retry recovery for malformed batches #1100
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#1100
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 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2198
Summary
Parityscan row
07-LB-API-lorebook-makerfound that the refactor Lorebook Maker no longer retries a batch when the model output cannot be parsed into valid lorebook entries. Legacy retried one malformed or empty batch before continuing, which made the maker more resilient to transient JSON formatting failures.Expected behavior
When Lorebook Maker generates a batch that cannot be parsed into entries, it should retry that batch once before accepting a partial/empty batch result or reporting failure.
Actual behavior
The refactor engine generator parses each batch once with
parseGameJsonish. If the parsed batch has no validentries, it emits abatch_warningand continues to the next batch. There is no retry loop for the failed batch, so a transient malformed response can silently reduce the generated entry count.Legacy
mainhandled the same route with a two-attempt loop: after an empty parse on the first attempt, it emitted a warning, added a retry separator to the stream, and retried the same batch once.Steps to reproduce
refactor, open Lorebook Maker and request enough entries to generate at least one batch.entriesarray for a batch.main, where the Lorebook Maker route retried the failed batch once before continuing.Impact area
Environment
refactorat577de008; legacy comparison was localmainat77a30fa4Logs, screenshots, or video
Static trace evidence:
src/features/catalog/lorebooks/components/dialogs/LorebookMakerModal.tsxgenerateLorebookMaker({ llm: llmApi, storage: storageApi }, ...).batch_warning,saved, anddoneevents.src/engine/generation/makers.tsgenerateLorebookMakerparses each batch once.entries.length === 0, it yieldsbatch_warning.runMakerRequest/parseObjectfor the same batch.main:packages/server/src/routes/lorebook-maker.routes.ts/lorebook-maker/generateroute loopedattempt < 2.batch_warning, wrote a retry token separator, and retried the batch.Targeted checks run during parityscan:
Regression notes
Legacy
mainwas more resilient for malformed Lorebook Maker batch output. The refactor still supports streaming, batching, and saving generated entries into an existing or new lorebook, but it dropped the parse-retry recovery behavior.Additional context
Parityscan batch: API / Remote / Maker / Architecture.
Rows scanned:
07-LB-API-focused-wrappers07-LB-API-lorebook-maker07-LB-REMOTE-command-routing07-LB-ERROR-vector-image-validation07-LB-CONTRACT-core-schemaOnly
07-LB-API-lorebook-makerproduced a parity gap in this slice. Suggested fix direction: restore a one-retry batch loop insidegenerateLorebookMaker, preserving the current engine-owned maker path and existingbatch_warningevent shape.Related tracker: #2181.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: