mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3920] [MERGED] Prevent duplicate generated posts and replies #6158
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#6158
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/3920
Author: @Xelvanis
Created: 7/21/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/prevent-duplicate-posts📝 Commits (7)
130028cPrevent duplicate generated posts and repliesd75ff9efix: handle duplicate discard edge cases7870cc6Merge branch 'staging' into fix/prevent-duplicate-postse96f31bMerge branch 'staging' into fix/prevent-duplicate-posts359d43bAddress CodeRabbit review feedbackc832a96Merge remote-tracking branch 'origin/staging' into codex/review-392031ddd1dMerge remote-tracking branch 'origin/pr-3920-live' into codex/review-3920📊 Changes
12 files changed (+356 additions, -52 deletions)
View changed files
📝
packages/client/src/hooks/use-background-autonomous.ts(+3 -1)📝
packages/client/src/hooks/use-generate.ts(+142 -44)📝
packages/server/src/routes/generate.routes.ts(+48 -0)📝
packages/server/src/routes/generate/conversation-prompt-formatting.ts(+2 -0)📝
packages/server/src/routes/generate/dry-run-route.ts(+8 -1)📝
packages/server/src/services/conversation/server-autonomous-scheduler.service.ts(+9 -2)📝
packages/server/src/services/conversation/transcript-sanitize.ts(+37 -1)📝
packages/server/src/services/noodle/noodle-generated-refresh.ts(+65 -0)📝
packages/server/src/services/noodle/noodle-prompt.ts(+3 -0)📝
packages/server/src/services/noodle/noodle-public-generation.service.ts(+15 -3)📝
packages/server/src/services/noodle/noodle-public-prompt.service.ts(+4 -0)📝
scripts/regressions/open-issues.regression.ts(+20 -0)📄 Description
Linked issue
Closes #3918
Why this change
Model output could be persisted more than once in two user-visible paths. Noodle could copy a new post verbatim into a reply from the same account, while Conversation mode could repeat a prior substantial message during either a normal reply or an Autonomous check-in.
Conversation also had a separate interrupted-stream recovery race: after an authoritative refetch found the server-saved response, the client could still POST its streamed partial as a second message.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommand results:
pnpm check— passed, including workspace lint/type checks and production builds.pnpm regression:roleplay— passed.pnpm regression:noodle— passed.pnpm regression:prompt— relevant Conversation assertions passed before the suite stopped on an unrelated existing assertion that the public agent reference is missing Prose Guardian.Manual verification notes
Docs and release impact
No installation, configuration, or release behavior changed. No documentation or version files were modified.
UI evidence (if applicable)
Not applicable; no visual UI changes.
Summary by CodeRabbit
Bug Fixes
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.