[GH-ISSUE #756] [Issue]: Deduplicate proven LTM assertions #388

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/756

Originally assigned to: @Promansis on GitHub.

Summary

Following Phase 0 (#735), Phase 1 (#744), and Phase 2 (#754), Long-Term Memory test coverage has been stabilized and isolated into scenario suites. However, multiple test suites still repeat identical setup boilerplate, duplicated resolver/scope permutations, redundant extraction error assertions, and weak or vacuous assertions (such as calling .every() across potentially empty mutation arrays without checking collection non-emptiness).

Phase 3 addresses in-file assertion deduplication across the Long-Term Memory regression suites without reducing behavioral boundaries.

Affected package

long-term-memory / tests

Expected behavior

  1. Repeated resolver and scope permutations are consolidated using table-driven test patterns where appropriate, preserving positive and negative coverage for each distinct mapping or scope dimension.
  2. Embedding batch boundaries (both count-limited and character-limited) and vector ordering guarantees remain explicitly proven.
  3. Boundary representations across persisted notes, HTTP responses, drafts, and mutation scopes remain covered where each crosses distinct system layers.
  4. Redundant full-object snapshot comparisons are streamlined to assert the specific fields downstream consumers actually require.
  5. Vacuous assertions (such as .every() calls on unverified or potentially empty collections) are hardened with non-empty length checks.
  6. Extraction error assertions are consolidated into table-driven cases while preserving coverage of distinct error codes.
  7. No regression in test isolation, suite completion watchdog guarantees, or coverage contracts.

Actual behavior

Test files contain redundant repetitive assertions, repeated full-object mirrors, duplicated error-handling cases, and weak/vacuous assertions that increase maintenance overhead without improving regression safety.

Steps to reproduce

  1. Inspect tests/long-term-memory-runtime.regression.ts and observe repeated embedding batch loops and repetitive resolver checks.
  2. Inspect tests/long-term-memory-storage.regression.ts and tests/long-term-memory-routes.regression.ts for repetitive assertion blocks and vacuous every() checks on mutations.
  3. Observe maintenance friction when updating assertion schemas across redundant test cases.

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/756 Originally assigned to: @Promansis on GitHub. ## Summary Following Phase 0 (#735), Phase 1 (#744), and Phase 2 (#754), Long-Term Memory test coverage has been stabilized and isolated into scenario suites. However, multiple test suites still repeat identical setup boilerplate, duplicated resolver/scope permutations, redundant extraction error assertions, and weak or vacuous assertions (such as calling `.every()` across potentially empty mutation arrays without checking collection non-emptiness). Phase 3 addresses in-file assertion deduplication across the Long-Term Memory regression suites without reducing behavioral boundaries. ## Affected package `long-term-memory` / `tests` ## Expected behavior 1. Repeated resolver and scope permutations are consolidated using table-driven test patterns where appropriate, preserving positive and negative coverage for each distinct mapping or scope dimension. 2. Embedding batch boundaries (both count-limited and character-limited) and vector ordering guarantees remain explicitly proven. 3. Boundary representations across persisted notes, HTTP responses, drafts, and mutation scopes remain covered where each crosses distinct system layers. 4. Redundant full-object snapshot comparisons are streamlined to assert the specific fields downstream consumers actually require. 5. Vacuous assertions (such as `.every()` calls on unverified or potentially empty collections) are hardened with non-empty length checks. 6. Extraction error assertions are consolidated into table-driven cases while preserving coverage of distinct error codes. 7. No regression in test isolation, suite completion watchdog guarantees, or coverage contracts. ## Actual behavior Test files contain redundant repetitive assertions, repeated full-object mirrors, duplicated error-handling cases, and weak/vacuous assertions that increase maintenance overhead without improving regression safety. ## Steps to reproduce 1. Inspect `tests/long-term-memory-runtime.regression.ts` and observe repeated embedding batch loops and repetitive resolver checks. 2. Inspect `tests/long-term-memory-storage.regression.ts` and `tests/long-term-memory-routes.regression.ts` for repetitive assertion blocks and vacuous `every()` checks on mutations. 3. Observe maintenance friction when updating assertion schemas across redundant test cases. ## 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.
bsakaguchi 2026-10-20 17:27:07 +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#388
No description provided.