[PR #755] [MERGED] test(long-term-memory): replace source-grep checks with behavioral proof (#754) #1121

Closed
opened 2026-10-21 05:03:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/755
Author: @Promansis
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @Promansis

Base: staging ← Head: chore(long-term-memory)/replace-source-checks


📝 Commits (1)

  • 7456842 test(long-term-memory): replace source-grep checks with behavioral proof (#754)

📊 Changes

5 files changed (+118 additions, -128 deletions)

View changed files

📝 tests/README.md (+0 -1)
📝 tests/long-term-memory-browser.regression.ts (+114 -50)
➖ tests/long-term-memory-chat-settings-ui.regression.mjs (+0 -33)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+0 -18)
📝 tests/long-term-memory-scope-fallback-labels.regression.ts (+4 -26)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #754

Why this change

  • Several Long-Term Memory regressions asserted static code structure via source-file regexes (readFileSync of MemoryVault.tsx, ChatSettings.tsx, etc.), making tests brittle to formatting and internal refactors without proving runtime correctness.
  • Phase 2 of the Long-Term Memory test cleanup plan replaces these source greps with executable behavioral assertions in the Playwright browser regression test and pure unit-level fallback proofs.

What changed

  • tests/long-term-memory-browser.regression.ts:
    • Added behavioral Archive Undo verification:
      • Verifies undo grouping for mixed prior statuses (active and resolved), ensuring separate restore requests map to each note's prior status.
      • Simulates partial restore failure and verifies rollback re-archives successfully restored notes (status: "archived") and displays the failure notice.
      • Verifies complete restore clears the Undo button and restores notes to their prior statuses.
    • Added compact chat settings layout checks (data-ltm-density="compact" and select control height bounded <= 38px).
    • Pruned redundant static string assertion loops matching unzipped artifactClient.
  • tests/long-term-memory-feedback-clarity-ui.regression.mjs:
    • Removed source regexes asserting MemoryVault.tsx implementation details for Archive Undo while retaining locale key completeness checks.
  • tests/long-term-memory-scope-fallback-labels.regression.ts:
    • Removed MemoryVault.tsx source regexes; added direct unit-level assertion that scopeTargetLabel honors local_character overrides.
  • tests/long-term-memory-chat-settings-ui.regression.mjs:
    • Removed obsolete source-string inspection script now that layout density is behaviorally verified in the browser suite.
  • tests/README.md:
    • Removed reference to deleted test runner.

Package and security impact

  • Affected package IDs: long-term-memory (test suite only; no package source or bundle modifications).
  • Engine compatibility impact: None.
  • New or changed permissions/entrypoints: None.
  • Restart, storage, update, or uninstall impact: None.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Ran npm run check (format:check + lint): passed with 0 errors.
  • Ran git diff --check: clean.
  • Ran local CI validation suite (test-ci.sh): all security, catalog, localization, and workflow gates passed.
  • Ran test-ltm.sh browser with MARINARA_ENGINE_ROOT: passed browser lifecycle and Archive Undo behavioral verification.
  • Ran all LTM test suites (storage, extraction-graph, extraction-reliability, runtime, routes-*, scope-*, etc.): passed.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

N/A (Test suite refactoring; no UI changes to package artifacts).

Summary by CodeRabbit

  • Bug Fixes

    • Improved Long-Term Memory archive and undo behavior when archiving multiple memories, including partial failures.
    • Restoring archived memories now preserves their previous statuses.
    • Improved fallback labeling for locally scoped memories.
  • UI Improvements

    • Added coverage for more compact chat settings controls.
  • Documentation

    • Updated the documented Long-Term Memory regression command.

🔄 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-Agents/pull/755 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/8/2026 **Status:** ✅ Merged **Merged:** 9/8/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `chore(long-term-memory)/replace-source-checks` --- ### 📝 Commits (1) - [`7456842`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7456842387699bdc7c9a2063e5ffc454a5e4693e) test(long-term-memory): replace source-grep checks with behavioral proof (#754) ### 📊 Changes **5 files changed** (+118 additions, -128 deletions) <details> <summary>View changed files</summary> 📝 `tests/README.md` (+0 -1) 📝 `tests/long-term-memory-browser.regression.ts` (+114 -50) ➖ `tests/long-term-memory-chat-settings-ui.regression.mjs` (+0 -33) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+0 -18) 📝 `tests/long-term-memory-scope-fallback-labels.regression.ts` (+4 -26) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #754 ## Why this change - Several Long-Term Memory regressions asserted static code structure via source-file regexes (`readFileSync` of `MemoryVault.tsx`, `ChatSettings.tsx`, etc.), making tests brittle to formatting and internal refactors without proving runtime correctness. - Phase 2 of the Long-Term Memory test cleanup plan replaces these source greps with executable behavioral assertions in the Playwright browser regression test and pure unit-level fallback proofs. ## What changed - `tests/long-term-memory-browser.regression.ts`: - Added behavioral Archive Undo verification: - Verifies undo grouping for mixed prior statuses (`active` and `resolved`), ensuring separate restore requests map to each note's prior status. - Simulates partial restore failure and verifies rollback re-archives successfully restored notes (`status: "archived"`) and displays the failure notice. - Verifies complete restore clears the Undo button and restores notes to their prior statuses. - Added compact chat settings layout checks (`data-ltm-density="compact"` and select control height bounded <= 38px). - Pruned redundant static string assertion loops matching unzipped `artifactClient`. - `tests/long-term-memory-feedback-clarity-ui.regression.mjs`: - Removed source regexes asserting `MemoryVault.tsx` implementation details for Archive Undo while retaining locale key completeness checks. - `tests/long-term-memory-scope-fallback-labels.regression.ts`: - Removed `MemoryVault.tsx` source regexes; added direct unit-level assertion that `scopeTargetLabel` honors `local_character` overrides. - `tests/long-term-memory-chat-settings-ui.regression.mjs`: - Removed obsolete source-string inspection script now that layout density is behaviorally verified in the browser suite. - `tests/README.md`: - Removed reference to deleted test runner. ## Package and security impact - Affected package IDs: `long-term-memory` (test suite only; no package source or bundle modifications). - Engine compatibility impact: None. - New or changed permissions/entrypoints: None. - Restart, storage, update, or uninstall impact: None. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Ran `npm run check` (`format:check` + `lint`): passed with 0 errors. - Ran `git diff --check`: clean. - Ran local CI validation suite (`test-ci.sh`): all security, catalog, localization, and workflow gates passed. - Ran `test-ltm.sh browser` with `MARINARA_ENGINE_ROOT`: passed browser lifecycle and Archive Undo behavioral verification. - Ran all LTM test suites (`storage`, `extraction-graph`, `extraction-reliability`, `runtime`, `routes-*`, `scope-*`, etc.): passed. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) N/A (Test suite refactoring; no UI changes to package artifacts). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved Long-Term Memory archive and undo behavior when archiving multiple memories, including partial failures. - Restoring archived memories now preserves their previous statuses. - Improved fallback labeling for locally scoped memories. - **UI Improvements** - Added coverage for more compact chat settings controls. - **Documentation** - Updated the documented Long-Term Memory regression command. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:03:11 +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-Agents#1121
No description provided.