[PR #1432] [MERGED] chore(long-term-memory): split server routes.ts by area (1.4.43) #1459

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

📋 Pull Request Information

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

Base: staging ← Head: chore(long-term-memory)/1419-routes-split


📝 Commits (2)

  • 8ddb5cc chore(long-term-memory): split server routes.ts by area (#1419)
  • b2b1356 Merge upstream/staging into chore(long-term-memory)/1419-routes-split; release long-term-memory 1.4.43

📊 Changes

21 files changed (+1880 additions, -1730 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.43.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/docs/ARCHITECTURE.md (+4 -2)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+57 -57)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+12 -1630)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/drafts.ts (+192 -0)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/imports.ts (+83 -0)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/maintenance.ts (+309 -0)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/notes.ts (+962 -0)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/settings.ts (+60 -0)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/shared.ts (+89 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-routes.regression.ts (+67 -0)

...and 1 more files

📄 Description

Pull request

Linked issue

Closes #1419

Why this change

All 56 Long-Term Memory endpoints and about 470 lines of request schemas lived in one 1,635-line routes.ts. Every server change to notes, drafts, imports, maintenance or settings touched that file, which made reviews large and parallel work conflict. This splits it by area as a pure move, with no behaviour change.

What changed

services/long-term-memory/
├── routes.ts              # composer only; same export, server-entry.ts unchanged
└── routes/
    ├── shared.ts          # body limits, queryBoolean, routeError, vaultNoteValidationError, rebuildAfterMutation(root, …)
    ├── notes.ts           # 19 endpoints
    ├── drafts.ts          # 11
    ├── imports.ts         # 4
    ├── maintenance.ts     # 17
    └── settings.ts        # 5
  • Package: long-term-memory 1.4.43 (patch). Rebuilt server.mjs, artifacts/long-term-memory-1.4.43.zip, manifest and catalog entries.
  • Handlers moved verbatim. A token comparison of old and new (imports excluded) differs only by the wrapper functions and rebuildAfterMutation becoming a function that takes root.
  • tests/long-term-memory-routes.regression.ts now pins the sorted list of 56 method and path pairs through an onRoute hook. It passed on the unsplit file before the move.
  • tests/long-term-memory-source-paths.mjs points the loading regression at routes/notes.ts, where /scope-targets and /local-characters now live.
  • docs/ARCHITECTURE.md describes the new layout.
  • Out of scope, as in the issue: raw error text in responses, moving /scope-targets logic into a service, deeper folders.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; engine.min / engine.maxExclusive unchanged
  • New or changed permissions/entrypoints: none; same routes, methods, paths and body limits
  • Restart, storage, update, or uninstall impact: none

Validation

Run locally on the pushed HEAD, with MARINARA_ENGINE_ROOT set (these are my results, not ticked boxes):

  • test-ltm.sh all (includes routes, routes-*, runtime, storage, loading, installation, engine-fields), npm run check (0 errors), git diff --check, node scripts/typecheck-packages.mjs long-term-memory

  • validate-catalog.mjs, test-catalog-lanes.mjs, validate-package-locales.mjs, tests/catalog-release-notes.regression.mjs

  • 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

Documentation impact

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

Merge danger

Door: two-way. Revert restores the single file.

Blast radius: LTM server routes only. A missed or renamed route would break the LTM screens, which the 56-route pin and the routes regression catch. The routes regression does not run in CI yet (#1414), so it was run locally.

🤖 Generated with Claude Code


🔄 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/1432 **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)/1419-routes-split` --- ### 📝 Commits (2) - [`8ddb5cc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8ddb5cc50d72a70620dbe756ddf07cbd3e31b147) chore(long-term-memory): split server routes.ts by area (#1419) - [`b2b1356`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b2b1356343d3c5fc48a1b8463cfcaca72956d5bb) Merge upstream/staging into chore(long-term-memory)/1419-routes-split; release long-term-memory 1.4.43 ### 📊 Changes **21 files changed** (+1880 additions, -1730 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.43.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/docs/ARCHITECTURE.md` (+4 -2) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+57 -57) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+12 -1630) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/drafts.ts` (+192 -0) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/imports.ts` (+83 -0) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/maintenance.ts` (+309 -0) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/notes.ts` (+962 -0) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/settings.ts` (+60 -0) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/shared.ts` (+89 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-routes.regression.ts` (+67 -0) _...and 1 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1419 ## Why this change All 56 Long-Term Memory endpoints and about 470 lines of request schemas lived in one 1,635-line `routes.ts`. Every server change to notes, drafts, imports, maintenance or settings touched that file, which made reviews large and parallel work conflict. This splits it by area as a pure move, with no behaviour change. ## What changed ```text services/long-term-memory/ ├── routes.ts # composer only; same export, server-entry.ts unchanged └── routes/ ├── shared.ts # body limits, queryBoolean, routeError, vaultNoteValidationError, rebuildAfterMutation(root, …) ├── notes.ts # 19 endpoints ├── drafts.ts # 11 ├── imports.ts # 4 ├── maintenance.ts # 17 └── settings.ts # 5 ``` - Package: `long-term-memory` 1.4.43 (patch). Rebuilt `server.mjs`, `artifacts/long-term-memory-1.4.43.zip`, manifest and catalog entries. - Handlers moved verbatim. A token comparison of old and new (imports excluded) differs only by the wrapper functions and `rebuildAfterMutation` becoming a function that takes `root`. - `tests/long-term-memory-routes.regression.ts` now pins the sorted list of 56 method and path pairs through an `onRoute` hook. It passed on the unsplit file before the move. - `tests/long-term-memory-source-paths.mjs` points the loading regression at `routes/notes.ts`, where `/scope-targets` and `/local-characters` now live. - `docs/ARCHITECTURE.md` describes the new layout. - Out of scope, as in the issue: raw error text in responses, moving `/scope-targets` logic into a service, deeper folders. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; `engine.min` / `engine.maxExclusive` unchanged - New or changed permissions/entrypoints: none; same routes, methods, paths and body limits - Restart, storage, update, or uninstall impact: none ## Validation Run locally on the pushed HEAD, with `MARINARA_ENGINE_ROOT` set (these are my results, not ticked boxes): - `test-ltm.sh all` (includes routes, routes-*, runtime, storage, loading, installation, engine-fields), `npm run check` (0 errors), `git diff --check`, `node scripts/typecheck-packages.mjs long-term-memory` - `validate-catalog.mjs`, `test-catalog-lanes.mjs`, `validate-package-locales.mjs`, `tests/catalog-release-notes.regression.mjs` - [ ] `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 - ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## Merge danger **Door:** two-way. Revert restores the single file. **Blast radius:** LTM server routes only. A missed or renamed route would break the LTM screens, which the 56-route pin and the routes regression catch. The routes regression does not run in CI yet (#1414), so it was run locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:44 +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#1459
No description provided.