[PR #2040] [MERGED] Fix Memory Recall hidden flag compatibility #5402

Closed
opened 2026-10-22 04:15:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2040
Author: @cha1latte
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2030-hidden-memory


📝 Commits (1)

  • f8b2aff Fix hidden memory recall flag

📊 Changes

1 file changed (+73 additions, -12 deletions)

View changed files

📝 src-tauri/src/commands/storage/chats.rs (+73 -12)

📄 Description

Linked issue

Closes #2030

Why this change

  • Memory Recall refresh already skipped messages hidden with the current hiddenFromAi flag, but legacy/imported messages can carry only hiddenFromAI, letting hidden content into rebuilt memory chunks.

What changed

  • Updated the Rust Memory Recall hidden-message helper to parse object or stringified extra values and treat either hiddenFromAI or hiddenFromAi as hidden.
  • Added a focused Rust regression covering legacy object extras, stringified legacy extras, current extras, and a visible-message negative control.

Refactor impact

Primary owner:

Rust storage / Memory Recall

Impact areas reviewed:

  • Chat mode Memory Recall refresh
  • Rust storage message filtering
  • Existing prompt/memory hidden-message flag compatibility

Boundary notes:

  • Change is contained to src-tauri/src/commands/storage/chats.rs.
  • No React feature, engine, shared API wrapper, command registration, dependency, schema, or remote-runtime routing changes.

Pressure points touched:

  • chat_memories_refresh / refresh_chat_memories filtering path only.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Before fix: cargo test --manifest-path src-tauri/Cargo.toml refresh_chat_memories_skips_legacy_and_current_hidden_flags failed because rebuilt memory content included legacy hidden memory and string hidden memory.
  • After fix: cargo test --manifest-path src-tauri/Cargo.toml refresh_chat_memories_skips_legacy_and_current_hidden_flags passed.
  • Raw targeted test result after fix: 1 passed; 0 failed; 404 filtered out.
  • cargo check --manifest-path src-tauri/Cargo.toml passed.
  • pnpm check passed after pnpm install --frozen-lockfile supplied missing node_modules in the isolated worktree.
  • CI Rust Capability Layer passed.
  • Bunny pass completed locally for issue match, proof quality, claim boundary, diff scope, whitespace, dependency, and debug-marker checks.
  • Local workflow helpers workflow-health.mjs and marinara-proof-gate.mjs were not present on this machine, so those specific helper gates could not be run.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • This is a storage compatibility bugfix for existing Memory Recall behavior, not a new discoverable feature.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A - no visible UI surface changed. The affected path is Rust storage filtering for Memory Recall refresh, verified by targeted Rust regression and pnpm check.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2040 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2030-hidden-memory` --- ### 📝 Commits (1) - [`f8b2aff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8b2aff427634b9e95c5c5324143f36930cf27b8) Fix hidden memory recall flag ### 📊 Changes **1 file changed** (+73 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/chats.rs` (+73 -12) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #2030 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Memory Recall refresh already skipped messages hidden with the current `hiddenFromAi` flag, but legacy/imported messages can carry only `hiddenFromAI`, letting hidden content into rebuilt memory chunks. ## What changed <!-- List the key changes in this PR. --> - Updated the Rust Memory Recall hidden-message helper to parse object or stringified `extra` values and treat either `hiddenFromAI` or `hiddenFromAi` as hidden. - Added a focused Rust regression covering legacy object extras, stringified legacy extras, current extras, and a visible-message negative control. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Rust storage / Memory Recall Impact areas reviewed: - Chat mode Memory Recall refresh - Rust storage message filtering - Existing prompt/memory hidden-message flag compatibility Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Change is contained to `src-tauri/src/commands/storage/chats.rs`. - No React feature, engine, shared API wrapper, command registration, dependency, schema, or remote-runtime routing changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - `chat_memories_refresh` / `refresh_chat_memories` filtering path only. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes <!-- Describe exact commands and manual steps, including typecheck/build/docs/architecture/Rust/browser/remote-runtime checks when they apply. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Before fix: `cargo test --manifest-path src-tauri/Cargo.toml refresh_chat_memories_skips_legacy_and_current_hidden_flags` failed because rebuilt memory content included `legacy hidden memory` and `string hidden memory`. - After fix: `cargo test --manifest-path src-tauri/Cargo.toml refresh_chat_memories_skips_legacy_and_current_hidden_flags` passed. - Raw targeted test result after fix: `1 passed; 0 failed; 404 filtered out`. - `cargo check --manifest-path src-tauri/Cargo.toml` passed. - `pnpm check` passed after `pnpm install --frozen-lockfile` supplied missing `node_modules` in the isolated worktree. - CI Rust Capability Layer passed. - Bunny pass completed locally for issue match, proof quality, claim boundary, diff scope, whitespace, dependency, and debug-marker checks. - Local workflow helpers `workflow-health.mjs` and `marinara-proof-gate.mjs` were not present on this machine, so those specific helper gates could not be run. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - This is a storage compatibility bugfix for existing Memory Recall behavior, not a new discoverable feature. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence <!-- Add before/after screenshots or recordings for visible UI changes. --> N/A - no visible UI surface changed. The affected path is Rust storage filtering for Memory Recall refresh, verified by targeted Rust regression and `pnpm check`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:59 +07:00
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#5402
No description provided.