mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2168] [Issue]: Agent JSON-repair ellipsis stripping deletes to end-of-line, breaking recoverable inline-ellipsis JSON #1078
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#1078
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 @Romuromylus on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2168
Originally assigned to: @cha1latte on GitHub.
Summary
In the LLM-JSON repair fallback, the legacy app removed only the three dots of a
...placeholder. The refactor advances past the dots and then consumes everything up to the next newline, so when an LLM emits an inline ellipsis on a line that also carries real JSON, the trailing valid JSON is discarded and the response no longer parses.Expected behavior
Stripping a
...placeholder removes just the placeholder, leaving surrounding JSON intact. Verified on{"a":1, ... "b":2}-> legacy yields{"a":1, "b":2}(valid).Actual behavior
The refactor deletes from
...to end-of-line:{"a":1, ... "b":2}->{"a":1,(invalid). A JSON agent whose response contained an inline...mid-line is recovered in legacy but fails to parse in the refactor (makeError for single agents, or an extra individual-retry round for batched agents).Steps to reproduce
JSON.parsealready failed) with a response containing an inline ellipsis sharing a line with valid trailing JSON.Impact area
Environment
93555d4bRegression notes
Worked in legacy (main @
c49f1d95). main:packages/server/src/services/agents/agent-executor.ts:1495-1498(stripJsonRepairTokens;index += 2; continue;). refactor @93555d4b:src/engine/agents-runtime/executor/agent-executor.ts:1806-1830(removeEllipsesOutsideJsonStrings adds a while-to-EOL loop). Narrow: only the repair-after-parse-failure fallback, and only inline (same-line) ellipses.