mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2392] [MERGED] Honor conversation start marker in generation history #5575
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#5575
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/2392
Author: @Romuromylus
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/conversation-start-marker📝 Commits (2)
004de10Honor conversation start marker in generation history14dc3f0Use boolish for the conversation start marker to tolerate boolish stored values📊 Changes
2 files changed (+10 additions, -1 deletions)
View changed files
📝
src/engine/generation/context.ts(+1 -0)📝
src/engine/generation/prompt-assembly.ts(+9 -1)📄 Description
Linked issue
Closes #2281
Why this change
isConversationStart) was a dead control during generation: the flag was both stripped by the generation message projection and ignored by the history builder, so messages before a user's new-start marker still entered the model context. This restores parity with main's generate.routes.ts and the engine's own auto-summary path.What changed
isConversationStarttoGENERATION_MESSAGE_EXTRA_FIELDSinsrc/engine/generation/context.tsso the flag survives the generation projection (previously stripped before prompt assembly ever saw it).historyMessagesinsrc/engine/generation/prompt-assembly.tsnow scansstoredMessagesnewest-to-oldest for the lastextra.isConversationStart === trueand slices history from that index before the existing hidden-filter +slice(-limit)tail. Mirrors the shipping pattern inauto-summary.service.ts:169.Refactor impact
Primary owner: engine generation
Impact areas reviewed:
src/engine/generation/context.ts(projection allowlist)src/engine/generation/prompt-assembly.ts(historyMessages)Boundary notes:
Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
pnpm vitest run src/engine/generation/prompt-assembly.test.ts— 11 passed (3 new cases: marker slices pre-marker history, stringified-extra marker form, no-marker passthrough keeps full history).pnpm exec tsc -b— clean.Feature Discoverability
src/features/shell/discovery/Reason:
Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.