[GH-ISSUE #735] [Issue]: Long-Term Memory: Measure and harden regression execution #378

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

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

Originally assigned to: @Promansis on GitHub.

Summary

The Long-Term Memory test suite (~15,400 lines across 16 files) currently lacks completion enforcement, allowing suites that stall or suspend on unresolved promises to silently exit with status 0 once the Node event loop drains. Specifically, tests/long-term-memory-routes.regression.ts contains an unresolved cancellation wait in lines 3487–3537 where importPackageInterop model requests route through a late configurePackageRuntime override whose mock lacks abortInFlight handling. Consequently, await chatCompleteEntered never resolves, Node drains the empty event loop and exits with code 0 before reaching the completion log, skipping subsequent assertions while reporting green. Additionally, only 2 of the 16 LTM test files run in PR CI checks, and runner documentation in tests/README.md is incomplete.

Affected package

long-term-memory / tests

Expected behavior

  1. When an async regression test scenario suspends or hangs, the process must fail explicitly with a timeout error and non-zero exit code rather than exiting 0.
  2. In tests/long-term-memory-routes.regression.ts, the in-flight cancellation scenario must resolve through the active model mock, trigger cancellation (inFlightResult.counts.cancelled === 1, abortReachedChatComplete === true), and complete the entire test run to the final completion log.
  3. Every direct-run LTM test suite must enforce completion.
  4. Baseline execution times, pass/fail status, and CI coverage gaps must be measured and documented.

Actual behavior

  1. tests/long-term-memory-routes.regression.ts exits with code 0 midway through execution without reaching the completion log or running subsequent assertions.
  2. Direct-run suites lack watchdog enforcement against silent event-loop drainage on unresolved promises.
  3. Only 2 of 16 LTM suites run in CI (long-term-memory-index-keys.regression.ts and long-term-memory-feedback-clarity-ui.regression.mjs).

Steps to reproduce

  1. Run MARINARA_ENGINE_ROOT="$PWD/../Marinara-Engine" pnpm --filter @marinara-engine/server exec tsx ../Marinara-Agents/tests/long-term-memory-routes.regression.ts
  2. Observe execution halts around the in-flight cancellation check (line 3530) and the process exits with code 0 without printing the final console.log("...") completion message.

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

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/735 Originally assigned to: @Promansis on GitHub. ## Summary The Long-Term Memory test suite (~15,400 lines across 16 files) currently lacks completion enforcement, allowing suites that stall or suspend on unresolved promises to silently exit with status 0 once the Node event loop drains. Specifically, `tests/long-term-memory-routes.regression.ts` contains an unresolved cancellation wait in lines 3487–3537 where `importPackageInterop` model requests route through a late `configurePackageRuntime` override whose mock lacks `abortInFlight` handling. Consequently, `await chatCompleteEntered` never resolves, Node drains the empty event loop and exits with code 0 before reaching the completion log, skipping subsequent assertions while reporting green. Additionally, only 2 of the 16 LTM test files run in PR CI checks, and runner documentation in `tests/README.md` is incomplete. ## Affected package `long-term-memory` / `tests` ## Expected behavior 1. When an async regression test scenario suspends or hangs, the process must fail explicitly with a timeout error and non-zero exit code rather than exiting 0. 2. In `tests/long-term-memory-routes.regression.ts`, the in-flight cancellation scenario must resolve through the active model mock, trigger cancellation (`inFlightResult.counts.cancelled === 1`, `abortReachedChatComplete === true`), and complete the entire test run to the final completion log. 3. Every direct-run LTM test suite must enforce completion. 4. Baseline execution times, pass/fail status, and CI coverage gaps must be measured and documented. ## Actual behavior 1. `tests/long-term-memory-routes.regression.ts` exits with code 0 midway through execution without reaching the completion log or running subsequent assertions. 2. Direct-run suites lack watchdog enforcement against silent event-loop drainage on unresolved promises. 3. Only 2 of 16 LTM suites run in CI (`long-term-memory-index-keys.regression.ts` and `long-term-memory-feedback-clarity-ui.regression.mjs`). ## Steps to reproduce 1. Run `MARINARA_ENGINE_ROOT="$PWD/../Marinara-Engine" pnpm --filter @marinara-engine/server exec tsx ../Marinara-Agents/tests/long-term-memory-routes.regression.ts` 2. Observe execution halts around the in-flight cancellation check (line 3530) and the process exits with code 0 without printing the final `console.log("...")` completion message. ## 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 Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:27:00 +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#378
No description provided.