[GH-ISSUE #754] [Issue]: Replace source-grep LTM checks with behavioral proof #390

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Multiple Long-Term Memory test files rely on brittle source-string regex assertions rather than verifying actual runtime state and user-visible behavior:

  1. tests/long-term-memory-feedback-clarity-ui.regression.mjs verifies Archive Undo state management and rollback purely through regex matches on MemoryVault.tsx source text.
  2. tests/long-term-memory-chat-settings-ui.regression.mjs checks CSS class names and prop substrings in ChatSettings.tsx and shared-controls.tsx.
  3. tests/long-term-memory-scope-fallback-labels.regression.ts checks MemoryVault.tsx source regex for fallback handling.
  4. tests/long-term-memory-browser.regression.ts checks unzipped client.js bundle strings for guidance and copy that are already exercised by browser UI workflows or covered by locale completeness validation.

Affected package

long-term-memory / tests

Expected behavior

  1. Archive Undo behavior (including mixed prior note status restoration and failure rollback) is covered by executable behavioral proof before removing source-code matching.
  2. Static structure checks are retained only where source structure itself is the contract (such as locale key completeness).
  3. Brittle source/artifact string checks with surviving behavioral or structural contracts are cleaned up without loss of test coverage.
  4. tests/long-term-memory-loading.regression.mjs is retained as behavioral/loading coverage.

Actual behavior

Key UI contracts (such as Archive Undo rollback on partial failure) are only verified by regular expression searches over raw component source code.

Steps to reproduce

  1. Inspect tests/long-term-memory-feedback-clarity-ui.regression.mjs lines 346–367.
  2. Observe assert.match(vault, /type ArchiveUndoState/u) and assert.match(vault, /if \(!allRestored\)/u) asserting source text directly.
  3. Inspect tests/long-term-memory-chat-settings-ui.regression.mjs asserting whitespace and class strings.

Environment

  • Marinara Engine version: 2.4.5+ (upstream/staging)
  • Package version: long-term-memory 0.1.0
  • Install type: source
  • OS + version: Linux (x86_64)

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 8, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/754 Originally assigned to: @Promansis on GitHub. ## Summary Multiple Long-Term Memory test files rely on brittle source-string regex assertions rather than verifying actual runtime state and user-visible behavior: 1. `tests/long-term-memory-feedback-clarity-ui.regression.mjs` verifies Archive Undo state management and rollback purely through regex matches on `MemoryVault.tsx` source text. 2. `tests/long-term-memory-chat-settings-ui.regression.mjs` checks CSS class names and prop substrings in `ChatSettings.tsx` and `shared-controls.tsx`. 3. `tests/long-term-memory-scope-fallback-labels.regression.ts` checks `MemoryVault.tsx` source regex for fallback handling. 4. `tests/long-term-memory-browser.regression.ts` checks unzipped `client.js` bundle strings for guidance and copy that are already exercised by browser UI workflows or covered by locale completeness validation. ## Affected package `long-term-memory` / `tests` ## Expected behavior 1. Archive Undo behavior (including mixed prior note status restoration and failure rollback) is covered by executable behavioral proof before removing source-code matching. 2. Static structure checks are retained only where source structure itself is the contract (such as locale key completeness). 3. Brittle source/artifact string checks with surviving behavioral or structural contracts are cleaned up without loss of test coverage. 4. `tests/long-term-memory-loading.regression.mjs` is retained as behavioral/loading coverage. ## Actual behavior Key UI contracts (such as Archive Undo rollback on partial failure) are only verified by regular expression searches over raw component source code. ## Steps to reproduce 1. Inspect `tests/long-term-memory-feedback-clarity-ui.regression.mjs` lines 346–367. 2. Observe `assert.match(vault, /type ArchiveUndoState/u)` and `assert.match(vault, /if \(!allRestored\)/u)` asserting source text directly. 3. Inspect `tests/long-term-memory-chat-settings-ui.regression.mjs` asserting whitespace and class strings. ## Environment - Marinara Engine version: 2.4.5+ (upstream/staging) - Package version: long-term-memory 0.1.0 - Install type: source - OS + version: Linux (x86_64) ## Template check - [ ] I DID NOT read this template and provide the requested details.
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#390
No description provided.