[GH-ISSUE #7042] [Issue]: Refresh LTM after effective embedding-connection changes #3943

Closed
opened 2026-10-21 06:08:56 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7042

Originally assigned to: @Promansis on GitHub.

Summary

Saving an effective embedding-connection change does not notify the active Long-Term Memory (LTM) package or await its index refresh. The save finishes before memory indexing is attempted, moving rebuild latency and failures to a later recall instead of reporting them with the configuration change.

Expected behavior

Persist valid configuration first, then call and await a narrow package-owned index-refresh operation when the effective LTM embedding configuration/selection changes. Report configuration-save success separately from indexing success, failure or a deferred/unavailable runtime. An indexing failure must not imply that the configuration was not saved.

Actual behavior

Connection create/update routes persist the configuration and reset Engine's vectorizer-availability cache, but do not notify the LTM runtime. Package-specific connection-selection save paths likewise have no LTM refresh integration. The capability host can resolve current embedding configuration lazily, so eventual configuration pickup exists; immediate refresh/completion feedback does not.

The Agents settings-triggered rebuild fix has landed, but the runtime service does not yet export the Engine-callable refresh operation needed here.

Steps to reproduce

An earlier helper/HTTP fixture exercised the real connection routes with a registered synthetic LTM runtime service; a complete installed-package/browser save-and-refresh flow has not been run:

  1. Register a test long-term-memory:runtime service with a counting refresh method and select a synthetic remote embedding connection.
  2. Create/update that connection through Engine's actual connection routes, changing its effective embedding model. Separately change credentials as a compatibility control.
  3. Observe that saves succeed and the remote model's space identity changes, but the runtime receives zero refresh notifications. Credential-only changes retain the vector-space identity while changing request/cache identity.

Environment

  • Marinara Engine version: upstream staging, source inspected at 35621d44bbe7bf3336943e1076e4e8065a8b835a; no release-build reproduction claimed.
  • Install type: source inspection and earlier disposable route fixtures, not an installer/container test.
  • OS + version: Linux investigation host; distribution/version not recorded.
  • Browser or app shell: not exercised.

Logs, screenshots, or video

No browser screenshots or provider-backed indexing logs were collected. The earlier route fixture observed successful saves, a changed remote model identity, and zero runtime notifications. It did not call a real embedding provider and was not rerun for this filing. Current upstream still has the missing notification path.

Current source references:

Additional context

Related package settings fix: Marinara-Agents #1193, implemented by PR #1195. A small, separately owned Agents companion change is still required to export the private refresh method. Do not implement package indexing in Engine or call its internal files directly.

Agreed scope without sidecar identity changes:

  • Engine owns configuration persistence, effective source selection, awaiting the package call and user feedback. The package owns freshness checks, vault locking and rebuilding. Use the existing runtime-service boundary, not a new event framework.
  • Cover effective default/global selection, referenced embedding-connection edits, and LTM package connection-selection saves through their existing host paths. Unrelated/unselected edits must not blindly trigger full rebuilds.
  • Do not rely solely on the current sidecar spaceId to decide whether saved embedding configuration changed. Credential/header changes are retry/request-cache changes, not automatically incompatible vector spaces; retain that distinction and handle recovery where appropriate.
  • Keep save success distinct from refresh failure/deferred status, bound the operation appropriately and localize any new user-facing feedback. Do not introduce a stale-index fallback.
  • Sidecar revision metadata, pooling-identity correction, same-path replacement detection and obsolete-source protection remain deferred. This issue does not claim to solve those limitations and is not blocked on that work.

Implementation validation should cover persistence-before-refresh; successful awaited completion; indexing error/timeout with saved configuration retained; inactive/older package behavior; selected/default/package-selection changes; unchanged/unselected edits; credential-only controls; and next-recall freshness. Reuse capability/connection regressions and the package's rebuild proofs, then run repository-required validation. No post-fix or browser gates have been run for this filing.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7042 Originally assigned to: @Promansis on GitHub. ## Summary Saving an effective embedding-connection change does not notify the active Long-Term Memory (LTM) package or await its index refresh. The save finishes before memory indexing is attempted, moving rebuild latency and failures to a later recall instead of reporting them with the configuration change. ## Expected behavior Persist valid configuration first, then call and await a narrow package-owned index-refresh operation when the effective LTM embedding configuration/selection changes. Report configuration-save success separately from indexing success, failure or a deferred/unavailable runtime. An indexing failure must not imply that the configuration was not saved. ## Actual behavior Connection create/update routes persist the configuration and reset Engine's vectorizer-availability cache, but do not notify the LTM runtime. Package-specific connection-selection save paths likewise have no LTM refresh integration. The capability host can resolve current embedding configuration lazily, so eventual configuration pickup exists; immediate refresh/completion feedback does not. The Agents settings-triggered rebuild fix has landed, but the runtime service does not yet export the Engine-callable refresh operation needed here. ## Steps to reproduce An earlier helper/HTTP fixture exercised the real connection routes with a registered synthetic LTM runtime service; a complete installed-package/browser save-and-refresh flow has not been run: 1. Register a test `long-term-memory:runtime` service with a counting refresh method and select a synthetic remote embedding connection. 2. Create/update that connection through Engine's actual connection routes, changing its effective embedding model. Separately change credentials as a compatibility control. 3. Observe that saves succeed and the remote model's space identity changes, but the runtime receives zero refresh notifications. Credential-only changes retain the vector-space identity while changing request/cache identity. ## Environment - Marinara Engine version: upstream `staging`, source inspected at `35621d44bbe7bf3336943e1076e4e8065a8b835a`; no release-build reproduction claimed. - Install type: source inspection and earlier disposable route fixtures, not an installer/container test. - OS + version: Linux investigation host; distribution/version not recorded. - Browser or app shell: not exercised. ## Logs, screenshots, or video No browser screenshots or provider-backed indexing logs were collected. The earlier route fixture observed successful saves, a changed remote model identity, and zero runtime notifications. It did not call a real embedding provider and was not rerun for this filing. Current upstream still has the missing notification path. Current source references: - [Connection create/update handlers](https://github.com/Pasta-Devs/Marinara-Engine/blob/35621d44bbe7bf3336943e1076e4e8065a8b835a/packages/server/src/routes/connections.routes.ts#L506-L523). - [Lazy capability embedding resolution](https://github.com/Pasta-Devs/Marinara-Engine/blob/35621d44bbe7bf3336943e1076e4e8065a8b835a/packages/server/src/services/capability-packages/capability-module-runtime.service.ts#L92-L112). - [Current LTM runtime-service exports](https://github.com/Pasta-Devs/Marinara-Agents/blob/ef64aeb7b4d82a509ce70c98412f2ec89367913e/packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/server-entry.ts#L37-L49). ## Additional context Related package settings fix: [Marinara-Agents #1193](https://github.com/Pasta-Devs/Marinara-Agents/issues/1193), implemented by [PR #1195](https://github.com/Pasta-Devs/Marinara-Agents/pull/1195). A small, separately owned Agents companion change is still required to export the private refresh method. Do not implement package indexing in Engine or call its internal files directly. Agreed scope without sidecar identity changes: - Engine owns configuration persistence, effective source selection, awaiting the package call and user feedback. The package owns freshness checks, vault locking and rebuilding. Use the existing runtime-service boundary, not a new event framework. - Cover effective default/global selection, referenced embedding-connection edits, and LTM package connection-selection saves through their existing host paths. Unrelated/unselected edits must not blindly trigger full rebuilds. - Do not rely solely on the current sidecar `spaceId` to decide whether saved embedding configuration changed. Credential/header changes are retry/request-cache changes, not automatically incompatible vector spaces; retain that distinction and handle recovery where appropriate. - Keep save success distinct from refresh failure/deferred status, bound the operation appropriately and localize any new user-facing feedback. Do not introduce a stale-index fallback. - Sidecar revision metadata, pooling-identity correction, same-path replacement detection and obsolete-source protection remain deferred. This issue does not claim to solve those limitations and is not blocked on that work. Implementation validation should cover persistence-before-refresh; successful awaited completion; indexing error/timeout with saved configuration retained; inactive/older package behavior; selected/default/package-selection changes; unchanged/unselected edits; credential-only controls; and next-recall freshness. Reuse capability/connection regressions and the package's rebuild proofs, then run repository-required validation. No post-fix or browser gates have been run for this filing. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:08:56 +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-Engine#3943
No description provided.