mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1897] Agent batching leaks post-processing turn data access across settings #921
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#921
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 @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1897
Originally assigned to: @SpicyMarinara on GitHub.
Summary
src/engine/agents-runtime/pipeline/agent-pipeline.tsbatches agents by connection/model only, then builds one shared batch context. For post-processing agents, that shared context unions per-agent turn data access settings such asincludePreGenInjectionsandincludeParallelResults.Evidence
Refactor behavior:
groupByProviderModelkeys groups asconnectionId::model.buildAgentContextenablespreGenInjectionswhen any agent in the batch hassettings.includePreGenInjections.buildAgentContextenablesparallelResultswhen any agent in the batch hassettings.includeParallelResults.Legacy behavior:
Current UI promise:
Impact
A post-processing agent that did not opt into current-turn data can receive data because another agent in the same connection/model batch opted in. This weakens the per-agent isolation contract and can expose prompt/runtime context beyond the selected agent settings.
Expected
Agents with different post-processing data access flags should not share a batch context. Grouping should include the relevant data-access flags or otherwise build context per agent.
Candidate Fix
Restore a grouping key equivalent to the legacy post-processing data key, covering at least
includePreGenInjectionsandincludeParallelResults.@SpicyMarinara commented on GitHub (Jun 2, 2026):
Fixed on refactor in
a4ba3c90: agent grouping now includes post-processing data-access flags, so agents with different includePreGenInjections/includeParallelResults settings do not share a batch context. Verification passed: typecheck, architecture, docs, build, cargo check, diff check.