[GH-ISSUE #884] [Issue]: LTM extraction calls updateNote with an unsupported third argument #467

Closed
opened 2026-10-20 17:27:49 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Sep 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/884

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory source extraction calls LongTermMemoryStorage.updateNote with
three arguments even though the storage API accepts only the note ID and patch.

Affected package

long-term-memory

Expected behavior

The source-extraction context-binding call should match the declared storage API
and pass only supported arguments. The context patch should still update the
source note's destination scope and modes.

Actual behavior

bindSourceNoteToExtractionContext passes a third metadata object containing
actor, cause, and summary to storage.updateNote. The declared method is
updateNote(id, patch). JavaScript ignores the extra argument, so the patch
currently still runs, but a proper typechecked build rejects the call with
TS2554: Expected 2 arguments, but got 3.

Steps to reproduce

  1. Enter model-backed source extraction with a scope or modes different from the
    stored source note context.
  2. Let bindSourceNoteToExtractionContext update the source note.
  3. Run a full TypeScript check or inspect the call at
    source-extraction.ts:90-98; the third argument is not accepted by
    storage.ts:412.

Environment

  • Marinara Engine version: staging checkout used by the Long-Term Memory package
  • Package version: current long-term-memory package on staging
  • Install type: source
  • OS + version: Linux
  • Browser or app shell: not applicable; server extraction path

Logs, screenshots, or video

source-extraction.ts(93,5): error TS2554: Expected 2 arguments, but got 3.

Relevant locations:

packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts:90-98
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts:412

Additional context

Audit finding: EXTRACT-002.

The minimal fix is to remove the unsupported metadata argument, unless the
storage API is deliberately expanded and all callers are updated. No runtime
data-loss claim is made; the current JavaScript call applies the two-argument
patch and ignores the metadata object.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/884 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory source extraction calls `LongTermMemoryStorage.updateNote` with three arguments even though the storage API accepts only the note ID and patch. ## Affected package `long-term-memory` ## Expected behavior The source-extraction context-binding call should match the declared storage API and pass only supported arguments. The context patch should still update the source note's destination scope and modes. ## Actual behavior `bindSourceNoteToExtractionContext` passes a third metadata object containing `actor`, `cause`, and `summary` to `storage.updateNote`. The declared method is `updateNote(id, patch)`. JavaScript ignores the extra argument, so the patch currently still runs, but a proper typechecked build rejects the call with `TS2554: Expected 2 arguments, but got 3`. ## Steps to reproduce 1. Enter model-backed source extraction with a scope or modes different from the stored source note context. 2. Let `bindSourceNoteToExtractionContext` update the source note. 3. Run a full TypeScript check or inspect the call at `source-extraction.ts:90-98`; the third argument is not accepted by `storage.ts:412`. ## Environment - Marinara Engine version: staging checkout used by the Long-Term Memory package - Package version: current `long-term-memory` package on `staging` - Install type: source - OS + version: Linux - Browser or app shell: not applicable; server extraction path ## Logs, screenshots, or video ```text source-extraction.ts(93,5): error TS2554: Expected 2 arguments, but got 3. ``` Relevant locations: ```text packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts:90-98 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts:412 ``` ## Additional context Audit finding: `EXTRACT-002`. The minimal fix is to remove the unsupported metadata argument, unless the storage API is deliberately expanded and all callers are updated. No runtime data-loss claim is made; the current JavaScript call applies the two-argument patch and ignores the metadata object. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:27:49 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#467
No description provided.