[PR #1431] [MERGED] chore(long-term-memory): document and check the Engine chat fields it reads #1457

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1431
Author: @Promansis
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @Promansis

Base: staging ← Head: chore(long-term-memory)/1418-engine-fields


📝 Commits (1)

  • 93dd7be chore(long-term-memory): document and check the Engine chat fields it reads (#1418)

📊 Changes

3 files changed (+65 additions, -1 deletions)

View changed files

📝 .github/workflows/ltm-browser.yml (+1 -1)
📝 packages/long-term-memory/docs/ARCHITECTURE.md (+20 -0)
➕ tests/long-term-memory-engine-fields.regression.ts (+44 -0)

📄 Description

Linked issue

Closes #1418

Why this change

Long-Term Memory imports chat summaries by reading five Engine-owned ChatMetadata fields directly (daySummaries, weekSummaries, summaryEntries, summary, gamePreviousSessionSummaries) and hard-codes the id of the Engine's built-in assistant (__professor_mari__). engine-boundary.json can't list either, and nothing documented or tested them. If the Engine renamed a field, Sources would quietly stop finding those summaries; if the assistant id changed, the assistant and its chats would start appearing as sources and scope targets.

What changed

  • packages/long-term-memory/docs/ARCHITECTURE.md: an "Engine fields read directly" table under Boundaries (field, what it feeds, Engine definition).
  • tests/long-term-memory-engine-fields.regression.ts (new): asserts LTM's PROFESSOR_MARI_CHARACTER_ID equals the Engine's PROFESSOR_MARI_ID, and that the Engine's ChatMetadata interface still declares each field. The fields exist only as TypeScript types, so the test reads the declaration; the id is a runtime constant, so it is compared by value.
  • .github/workflows/ltm-browser.yml: engine-fields added to the Long-Term Memory regression loop.
  • Limit: this runs on LTM PRs against Engine staging. It makes a break visible on the next LTM PR; it can't stop an Engine release from breaking the import. The proper fix is an Engine API for chat summaries.
  • Known gaps (from review, not changed here): LTM also reads branchName and activeAgentIds, which the table and test don't cover; the table's wording could say it lists the summary fields and assistant id rather than every Engine field.

Package and security impact

  • Affected package IDs: long-term-memory (docs and tests only; docs are not in the package archive)
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none. No version bump, rebuild or generated output.

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

Run by the coding agent, not by a person. Engine checkout 2039583ca, Node v24.15.0.

  • New test through the Engine's tsx, as CI runs it: passes. Against a temporary Engine root with weekSummaries renamed, and again with a different assistant id: each fails with the matching message.
  • test-fast.sh (npm run check, git diff --check), test-ci.sh, and the four catalog validators pass.
  • One read-only review pass: no Blocking, High or Medium findings.

Documentation impact

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

Updated packages/long-term-memory/docs/ARCHITECTURE.md.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added a regression check to catch mismatches between Long-Term Memory and Engine assistant identifiers and chat summary fields.
    • Included the check in the Long-Term Memory regression workflow.
  • Documentation
    • Documented the Engine-owned fields Long-Term Memory reads and the effects of missing or renamed fields.

🔄 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/1431 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `chore(long-term-memory)/1418-engine-fields` --- ### 📝 Commits (1) - [`93dd7be`](https://github.com/Pasta-Devs/Marinara-Agents/commit/93dd7be1bf948f594dce845cae9cba724fd2b0a6) chore(long-term-memory): document and check the Engine chat fields it reads (#1418) ### 📊 Changes **3 files changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ltm-browser.yml` (+1 -1) 📝 `packages/long-term-memory/docs/ARCHITECTURE.md` (+20 -0) ➕ `tests/long-term-memory-engine-fields.regression.ts` (+44 -0) </details> ### 📄 Description ## Linked issue Closes #1418 ## Why this change Long-Term Memory imports chat summaries by reading five Engine-owned `ChatMetadata` fields directly (`daySummaries`, `weekSummaries`, `summaryEntries`, `summary`, `gamePreviousSessionSummaries`) and hard-codes the id of the Engine's built-in assistant (`__professor_mari__`). `engine-boundary.json` can't list either, and nothing documented or tested them. If the Engine renamed a field, Sources would quietly stop finding those summaries; if the assistant id changed, the assistant and its chats would start appearing as sources and scope targets. ## What changed - `packages/long-term-memory/docs/ARCHITECTURE.md`: an "Engine fields read directly" table under Boundaries (field, what it feeds, Engine definition). - `tests/long-term-memory-engine-fields.regression.ts` (new): asserts LTM's `PROFESSOR_MARI_CHARACTER_ID` equals the Engine's `PROFESSOR_MARI_ID`, and that the Engine's `ChatMetadata` interface still declares each field. The fields exist only as TypeScript types, so the test reads the declaration; the id is a runtime constant, so it is compared by value. - `.github/workflows/ltm-browser.yml`: `engine-fields` added to the Long-Term Memory regression loop. - Limit: this runs on LTM PRs against Engine `staging`. It makes a break visible on the next LTM PR; it can't stop an Engine release from breaking the import. The proper fix is an Engine API for chat summaries. - Known gaps (from review, not changed here): LTM also reads `branchName` and `activeAgentIds`, which the table and test don't cover; the table's wording could say it lists the summary fields and assistant id rather than every Engine field. ## Package and security impact - Affected package IDs: `long-term-memory` (docs and tests only; docs are not in the package archive) - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none. No version bump, rebuild or generated output. ## 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 Run by the coding agent, not by a person. Engine checkout `2039583ca`, Node v24.15.0. - New test through the Engine's tsx, as CI runs it: passes. Against a temporary Engine root with `weekSummaries` renamed, and again with a different assistant id: each fails with the matching message. - `test-fast.sh` (`npm run check`, `git diff --check`), `test-ci.sh`, and the four catalog validators pass. - One read-only review pass: no Blocking, High or Medium findings. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Updated `packages/long-term-memory/docs/ARCHITECTURE.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Added a regression check to catch mismatches between Long-Term Memory and Engine assistant identifiers and chat summary fields. * Included the check in the Long-Term Memory regression workflow. * **Documentation** * Documented the Engine-owned fields Long-Term Memory reads and the effects of missing or renamed fields. <!-- 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:11:42 +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#1457
No description provided.