[PR #743] [MERGED] fix(long-term-memory): harden regression completion #1114

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/measure-harden-regression


📝 Commits (6)

  • dfd14c9 fix(long-term-memory): harden regression completion
  • 9db824d test(long-term-memory): bound watchdog failures
  • 4347d7a test(long-term-memory): narrow Phase 0 scope
  • bb8fcda Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/measure-harden-regression
  • 61e5a3b Merge branch 'staging' into fix(long-term-memory)/measure-harden-regression
  • eff445e Merge branch 'staging' into fix(long-term-memory)/measure-harden-regression

📊 Changes

16 files changed (+243 additions, -85 deletions)

View changed files

📝 tests/README.md (+8 -1)
📝 tests/long-term-memory-conversation-summary-import.regression.ts (+2 -2)
📝 tests/long-term-memory-debug-log.regression.ts (+2 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+2 -1)
📝 tests/long-term-memory-extraction-reliability.regression.ts (+2 -1)
📝 tests/long-term-memory-index-keys.regression.ts (+2 -1)
📝 tests/long-term-memory-lifecycle.regression.ts (+2 -2)
📝 tests/long-term-memory-loading.regression.mjs (+75 -68)
📝 tests/long-term-memory-local-characters.regression.ts (+2 -1)
📝 tests/long-term-memory-routes.regression.ts (+34 -2)
📝 tests/long-term-memory-runtime.regression.ts (+2 -2)
📝 tests/long-term-memory-source-task.regression.ts (+2 -1)
📝 tests/long-term-memory-storage.regression.ts (+2 -2)
➕ tests/regression-helpers.mjs (+29 -0)
➕ tests/regression-helpers.regression.mjs (+75 -0)
📝 tests/regression-helpers.ts (+2 -0)

📄 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 #735

Why this change

  • Long-Term Memory regression processes can silently exit successfully when an unresolved promise drains the Node event loop. This makes a stalled suite look green and hides later assertions.

What changed

  • Added a shared completion watchdog for async direct-run LTM suites and the direct Node loading suite.
  • Added a named timeout error, bounded termination for stalled processes with live handles, and regression proof for timeout, live-handle, success, and ordinary-rejection paths.
  • Hardened the in-flight cancellation fixture with active model-mock abort handling and a bounded wait whose timer is cleaned up.
  • Documented the complete 16-suite LTM runner inventory and watchdog proof command.

Package and security impact

  • Affected package IDs: None; tests and test documentation only.
  • 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

  • Watchdog regression passed, including named timeout errors, live-handle bounded termination, successful timer cleanup, and ordinary rejection propagation.
  • npm run check passed with zero errors and existing warnings.
  • Catalog lane, locale, catalog, release-note, formatting, and diff checks passed.
  • The complete LTM runner reaches the routes suite, then stops at the existing currentPreview assertion in the clean Phase 0 source state. Unrelated dirty package/server edits were intentionally excluded from this PR.
  • No package rebuild or artifact validation was applicable because no package payloads, manifests, artifacts, or catalogs changed.

Documentation impact

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

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes

    • Improved regression test completion handling with consistent timeout detection, error reporting, and exit-code management.
    • Strengthened cancellation and loading checks for long-term memory workflows.
  • Tests

    • Expanded the regression command to cover additional long-term memory suites.
    • Added coverage for completion watchdog behavior, including timeouts, successful completion, and error propagation.

🔄 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/743 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/7/2026 **Status:** ✅ Merged **Merged:** 9/7/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/measure-harden-regression` --- ### 📝 Commits (6) - [`dfd14c9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dfd14c960eab9d91ef1d8f184bb176913ec38d09) fix(long-term-memory): harden regression completion - [`9db824d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9db824dbf891fdfd3919fd8db0353ed55ce90953) test(long-term-memory): bound watchdog failures - [`4347d7a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4347d7a431dd3b7d5bd3c301d716f03f65daf332) test(long-term-memory): narrow Phase 0 scope - [`bb8fcda`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bb8fcda818bfbe235436fe2292302642302aa5f8) Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/measure-harden-regression - [`61e5a3b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/61e5a3b1f30d8dbccc32239d5a0ffcceacdeaf6c) Merge branch 'staging' into fix(long-term-memory)/measure-harden-regression - [`eff445e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/eff445e6f8626ccc15e4a2c851cc1738b53c1e27) Merge branch 'staging' into fix(long-term-memory)/measure-harden-regression ### 📊 Changes **16 files changed** (+243 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `tests/README.md` (+8 -1) 📝 `tests/long-term-memory-conversation-summary-import.regression.ts` (+2 -2) 📝 `tests/long-term-memory-debug-log.regression.ts` (+2 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+2 -1) 📝 `tests/long-term-memory-extraction-reliability.regression.ts` (+2 -1) 📝 `tests/long-term-memory-index-keys.regression.ts` (+2 -1) 📝 `tests/long-term-memory-lifecycle.regression.ts` (+2 -2) 📝 `tests/long-term-memory-loading.regression.mjs` (+75 -68) 📝 `tests/long-term-memory-local-characters.regression.ts` (+2 -1) 📝 `tests/long-term-memory-routes.regression.ts` (+34 -2) 📝 `tests/long-term-memory-runtime.regression.ts` (+2 -2) 📝 `tests/long-term-memory-source-task.regression.ts` (+2 -1) 📝 `tests/long-term-memory-storage.regression.ts` (+2 -2) ➕ `tests/regression-helpers.mjs` (+29 -0) ➕ `tests/regression-helpers.regression.mjs` (+75 -0) 📝 `tests/regression-helpers.ts` (+2 -0) </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 #735 ## Why this change - Long-Term Memory regression processes can silently exit successfully when an unresolved promise drains the Node event loop. This makes a stalled suite look green and hides later assertions. ## What changed - Added a shared completion watchdog for async direct-run LTM suites and the direct Node loading suite. - Added a named timeout error, bounded termination for stalled processes with live handles, and regression proof for timeout, live-handle, success, and ordinary-rejection paths. - Hardened the in-flight cancellation fixture with active model-mock abort handling and a bounded wait whose timer is cleaned up. - Documented the complete 16-suite LTM runner inventory and watchdog proof command. ## Package and security impact - Affected package IDs: None; tests and test documentation only. - 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 - Watchdog regression passed, including named timeout errors, live-handle bounded termination, successful timer cleanup, and ordinary rejection propagation. - `npm run check` passed with zero errors and existing warnings. - Catalog lane, locale, catalog, release-note, formatting, and diff checks passed. - The complete LTM runner reaches the routes suite, then stops at the existing `currentPreview` assertion in the clean Phase 0 source state. Unrelated dirty package/server edits were intentionally excluded from this PR. - No package rebuild or artifact validation was applicable because no package payloads, manifests, artifacts, or catalogs changed. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) <!-- No UI changes. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved regression test completion handling with consistent timeout detection, error reporting, and exit-code management. - Strengthened cancellation and loading checks for long-term memory workflows. - **Tests** - Expanded the regression command to cover additional long-term memory suites. - Added coverage for completion watchdog behavior, including timeouts, successful completion, and error propagation. <!-- 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:02:57 +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#1114
No description provided.