mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2396] [MERGED] Merge all chunk extractions when knowledge consolidation under-merges #5580
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#5580
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/2396
Author: @Romuromylus
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/knowledge-merge-all-chunks📝 Commits (2)
def5f28Merge all chunk extractions when knowledge consolidation under-mergesbeb1421Require all prior-extraction lines to survive before trusting consolidation📊 Changes
1 file changed (+46 additions, -2 deletions)
View changed files
📝
src/engine/agents-runtime/knowledge/knowledge-retrieval.ts(+46 -2)📄 Description
Linked issue
Closes #2326
Why this change
What changed
executeKnowledgeRetrieval(src/engine/agents-runtime/knowledge/knowledge-retrieval.ts), the all-chunks-succeeded branch now checks whether the consolidation actually preserved each prior extraction (first content-bearing line survives, case-insensitive). If it did, the consolidated text is returned verbatim (happy path unchanged). If it under-merged, it falls back to joining the consolidated pass plus every dropped prior extraction, de-duplicated — mirroring the existing partial-failure branch's "never drop" behavior.Refactor impact
Primary owner: engine generation (agents-runtime)
Impact areas reviewed:
src/engine/agents-runtime/knowledge/knowledge-retrieval.ts(multi-pass consolidation branch only)Boundary notes:
Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
pnpm vitest run src/engine/agents-runtime/knowledge/knowledge-retrieval.test.ts— 2 passed (new file): under-merged consolidation now preserves FACT_1/FACT_2/FACT_3; a true-superset consolidation returns verbatim with no duplicated blocks.pnpm exec tsc -b— clean. ESLint — 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.