mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 20:58:37 +07:00
[GH-ISSUE #885] [Issue]: LTM import passes extraction scope to a batch API that ignores it #466
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#466
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 @Promansis on GitHub (Sep 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/885
Originally assigned to: @Promansis on GitHub.
Summary
The Long-Term Memory import interop caller passes an extraction
scopeto thesource batch processor, but the batch options type does not declare it and the
worker does not forward it to source preparation.
Affected package
long-term-memoryExpected behavior
The batch API should have one explicit, type-correct scope contract. If the
caller-provided scope is intentionally authoritative, it must be declared and
forwarded for every item. If persisted source-note destination scope is the
authority, the unused caller argument should be removed. Mixed-source batches
must not accidentally apply the first item's scope to every item.
Actual behavior
importPackageInteroppassesscope: extractionScopetoprocessLongTermMemorySourceBatch, but that inline options type has noscopefield. The worker also omits
scopewhen callingprepareLongTermMemorySource, so preparation falls back tosourceNote.destinationScope ?? sourceNote.scope.A targeted probe passed an explicit
{ chatId: "explicit" }scope for a notepersisted with
{ chatId: "persisted" }. The call succeeded, but the capturedextraction prompt used
chatId: "persisted"; the explicit scope was ignored.Steps to reproduce
{ chatId: "persisted" }.extraction scope
{ chatId: "explicit" }.context uses the persisted scope rather than the supplied scope.
Environment
long-term-memorypackage onstagingLogs, screenshots, or video
Relevant locations:
The earlier neighboring compiler run recorded
TS2353for the excessscopeproperty. The current package helper is not a full excess-property compiler
check.
Additional context
Audit finding:
EXTRACT-001.Recommended minimal direction is to remove the unused batch scope argument and
keep each persisted source note's destination authoritative, unless the API
owner explicitly decides that a per-item scope contract is required. Blindly
forwarding one batch scope is unsafe for mixed-source imports.
Template check