[GH-ISSUE #1856] [Issue]: Slurp still says Long-Term Memory isn't sharing after its sharing switch is turned on #1788

Closed
opened 2026-11-07 16:36:40 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

Slurp's Backstage → Engine link shows "Long-Term Memory isn't sharing memories" (memoryStatusOff) under "What your
other Agents know" after Long-Term Memory's "Other Agents can read memories" switch has been turned back on. The line
stays until the next Creator post or DM reply reads memories, even though that read will now work.

Affected package

slurp2 (Slurp). Found by Dottore Review on #1855 (finding 5abdc09bda4802f8, Low).

Expected behavior

Once Long-Term Memory's sharing switch is on, the panel stops showing the "off" line, whichever side turned it on.

Actual behavior

GET /settings/memory-status (slp-settings-routes.ts:62) returns lastStatus from
server/src/slp/data/creators/slp-ltm-recall.ts:31, which only recallSlurpMemories sets. It is the outcome of the
last recall, not the current state, so:

  • Slurp's offer (#1853, 0.4.10): after "Turn it on", the panel clears the cached status
    (SlpEngineLinkPanel.tsx:37, setQueryData(... { status: null })). The next refetch (30 s staleTime, remount or
    window focus) brings "off" back.
  • Long-Term Memory's side (#1854), or turning sharing on by hand in Memory Settings: nothing clears it, so the
    line stays "off" until the next recall.

Creators do use memories from the next recall either way. Only the status line is wrong.

Steps to reproduce

  1. Turn off Long-Term Memory → Memory Settings → "Other Agents can read memories", save.
  2. Let a Slurp Creator post or reply to a DM, so Slurp records off. Backstage → Engine link shows the "off" line.
  3. Turn the Long-Term Memory switch back on (in Memory Settings, or through Slurp's "Turn it on" offer).
  4. Reopen Backstage → Engine link after 30 s: the "off" line is still there.

Environment

  • Marinara Engine version: staging host
  • Package version: Slurp 0.4.10 (PR #1855); the second path also on 0.4.9
  • Install type: source
  • OS + version: any
  • Browser or app shell: any

Logs, screenshots, or video

None; the cause is in the code paths above.

Additional context

Minimal fix (client only, no server change, no new route)

  1. client/src/slp/features/settings/slp-settings-hooks.ts useSlurpMemoryStatus: when the server answers "off",
    also read api.get("/long-term-memory/settings"). If that succeeds with longTermMemoryShareWithPackages !== false,
    return { status: null }. If the read fails, keep "off". Any other status is returned as is, with no extra read.
    Put the decision in a small exported pure function (for example currentMemoryStatus({ read, readLtm })) next to
    offerLtmSharing in slp-ltm-sharing-offer.ts, so it can be tested without React.
  2. SlpEngineLinkPanel.tsx:35-38: replace the setQueryData(... { status: null }) workaround and its comment with
    queryClient.invalidateQueries({ queryKey: [...slpKeys.settings(), "memory-status"] }) on "enabled".
  3. packages/slurp2/CHANGELOG.md: one line under ## Unreleased. Patch; reland.mjs sets the version at land.

This also covers turning sharing on from Long-Term Memory, which a reset route on Slurp's server would not.

Proof

Extend tests/slurp2-ltm-recall.regression.ts: "off" with Long-Term Memory sharing on → null; "off" with it off
→ "off"; "off" with the read throwing → "off"; "ok" / "missing" / "error" → returned with no Long-Term
Memory read. Update the panel source pin near line 389 to expect invalidateQueries, not setQueryData. Run that test,
tests/slurp2-life-moments.regression.ts, test-fast.sh, npm run check.

Non-goals

  • Changing lastStatus or the /settings/memory-status route.
  • Any Long-Term Memory or Engine change.

Related: #1853 / #1855 (Slurp offer), #1854 (Long-Term Memory offer).

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1856 Originally assigned to: @Promansis on GitHub. ## Summary Slurp's Backstage → Engine link shows "Long-Term Memory isn't sharing memories" (`memoryStatusOff`) under "What your other Agents know" after Long-Term Memory's "Other Agents can read memories" switch has been turned back on. The line stays until the next Creator post or DM reply reads memories, even though that read will now work. ## Affected package `slurp2` (Slurp). Found by Dottore Review on #1855 (finding `5abdc09bda4802f8`, Low). ## Expected behavior Once Long-Term Memory's sharing switch is on, the panel stops showing the "off" line, whichever side turned it on. ## Actual behavior `GET /settings/memory-status` (`slp-settings-routes.ts:62`) returns `lastStatus` from `server/src/slp/data/creators/slp-ltm-recall.ts:31`, which only `recallSlurpMemories` sets. It is the outcome of the last recall, not the current state, so: - **Slurp's offer (#1853, 0.4.10):** after "Turn it on", the panel clears the cached status (`SlpEngineLinkPanel.tsx:37`, `setQueryData(... { status: null })`). The next refetch (30 s `staleTime`, remount or window focus) brings "off" back. - **Long-Term Memory's side (#1854), or turning sharing on by hand in Memory Settings:** nothing clears it, so the line stays "off" until the next recall. Creators do use memories from the next recall either way. Only the status line is wrong. ## Steps to reproduce 1. Turn off Long-Term Memory → Memory Settings → "Other Agents can read memories", save. 2. Let a Slurp Creator post or reply to a DM, so Slurp records `off`. Backstage → Engine link shows the "off" line. 3. Turn the Long-Term Memory switch back on (in Memory Settings, or through Slurp's "Turn it on" offer). 4. Reopen Backstage → Engine link after 30 s: the "off" line is still there. ## Environment - Marinara Engine version: staging host - Package version: Slurp 0.4.10 (PR #1855); the second path also on 0.4.9 - Install type: source - OS + version: any - Browser or app shell: any ## Logs, screenshots, or video None; the cause is in the code paths above. ## Additional context ### Minimal fix (client only, no server change, no new route) 1. `client/src/slp/features/settings/slp-settings-hooks.ts` `useSlurpMemoryStatus`: when the server answers `"off"`, also read `api.get("/long-term-memory/settings")`. If that succeeds with `longTermMemoryShareWithPackages !== false`, return `{ status: null }`. If the read fails, keep `"off"`. Any other status is returned as is, with no extra read. Put the decision in a small exported pure function (for example `currentMemoryStatus({ read, readLtm })`) next to `offerLtmSharing` in `slp-ltm-sharing-offer.ts`, so it can be tested without React. 2. `SlpEngineLinkPanel.tsx:35-38`: replace the `setQueryData(... { status: null })` workaround and its comment with `queryClient.invalidateQueries({ queryKey: [...slpKeys.settings(), "memory-status"] })` on `"enabled"`. 3. `packages/slurp2/CHANGELOG.md`: one line under `## Unreleased`. Patch; `reland.mjs` sets the version at land. This also covers turning sharing on from Long-Term Memory, which a reset route on Slurp's server would not. ### Proof Extend `tests/slurp2-ltm-recall.regression.ts`: `"off"` with Long-Term Memory sharing on → `null`; `"off"` with it off → `"off"`; `"off"` with the read throwing → `"off"`; `"ok"` / `"missing"` / `"error"` → returned with no Long-Term Memory read. Update the panel source pin near line 389 to expect `invalidateQueries`, not `setQueryData`. Run that test, `tests/slurp2-life-moments.regression.ts`, `test-fast.sh`, `npm run check`. ### Non-goals - Changing `lastStatus` or the `/settings/memory-status` route. - Any Long-Term Memory or Engine change. Related: #1853 / #1855 (Slurp offer), #1854 (Long-Term Memory offer). ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:36:40 +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#1788
No description provided.