mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1473] [MERGED] fix(long-term-memory): clear 75 strict TypeScript errors, gate them, and fail when tsc cannot start (1.4.55) #1481
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1481
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1473
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/ltm-strict-typecheck-1466📝 Commits (7)
1e90146fix(long-term-memory): clear the 44 strict server errors and gate theme697b88fix(long-term-memory): clear the 31 strict client errors and gate them0a80a3dbuild(long-term-memory): 1.4.55c8565afMerge origin/staging (long-term-memory 1.4.54) and rebuild 1.4.55bc3e193Merge branch 'staging' into fix/ltm-strict-typecheck-14669ff6552Merge branch 'staging' into fix/ltm-strict-typecheck-1466c4b1c01Merge branch 'staging' into fix/ltm-strict-typecheck-1466📊 Changes
36 files changed (+257 additions, -143 deletions)
View changed files
📝
.github/workflows/ltm-browser.yml(+12 -0)📝
.github/workflows/pull-request-checks.yml(+3 -0)➕
artifacts/long-term-memory-1.4.55.zip(+0 -0)📝
catalog/catalog.json(+8 -8)📝
catalog/notes.json(+6 -6)📝
catalog/v2/catalog.json(+8 -8)📝
catalog/v2/notes.json(+6 -6)📝
catalog/v3/catalog.json(+8 -8)📝
catalog/v3/notes.json(+6 -6)📝
packages/long-term-memory/CHANGELOG.md(+4 -0)📝
packages/long-term-memory/client.js(+18 -18)📝
packages/long-term-memory/manifest.json(+5 -5)📝
packages/long-term-memory/server.mjs(+4 -4)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/review/review-queue-ambiguous-link.ts(+4 -10)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/review/review-state.ts(+2 -2)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/settings/ActivityView.tsx(+1 -1)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/sources/SourcesWorkspace.tsx(+16 -8)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx(+2 -2)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/drafts/draft-projector.ts(+2 -2)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/drafts/draft-review.ts(+1 -1)...and 16 more files
📄 Description
Pull request
Linked issue
Closes #1466
Why this change
ERR_INVALID_ARG_TYPEwhen the root is missing.scripts/typecheck-packages.mjsreported success whentsccould not start. In a fresh worktree withoutnode_modules, the spawn failed with ENOENT and no output, and the script printed "no syntax errors, undefined names or unresolved modules" and exited 0. A gate that cannot fail is not a gate.Both parts of the issue are here, in separate commits.
What changed
Commit 1: script, server and shared, gate
scripts/typecheck-packages.mjsfails whentscexits with no status (ENOENT, a signal) or exits with no output. New regressionscripts/tests/typecheck-packages-missing-tsc.regression.mjsruns the script in a tree withoutnode_modulesand expects it to fail. It is wired into Pull Request Checks.MARINARA_ENGINE_ROOTset, the script links that Engine'snode_modulesinto the overlay. For packages listed inSTRICT_RUNS(onlylong-term-memoryfor now), it then runs an unfiltered--strict --types nodetsc. Without an Engine root it prints that the strict check was skipped, so Pull Request Checks (which has no Engine checkout) runs only the name check as before. The existing filtered run is unchanged and runs before the links are made..github/workflows/ltm-browser.ymlrunsnpm ciand then the strict check as its last two steps. This workflow already checks out and installs Engine staging. The steps come last so the regressions above them resolve the package's imports exactly as before.scripts/typecheck-packages.mjswas added to the workflow's paths.Exclude/Pickon helper signatures, and a typedreadJsonFile. The first one wasDEFAULT_LTM_IMPORTED_SOURCE_MODE: LtmMode, which cleared 12. The fixes with a runtime footprint:rootis now required onExtractLongTermMemoryFromSourceNoteOptions, ongetExistingTypedNotes, onreconcileEvidenceUnitCandidates, and on the two source-processing option types that pass it down. Every caller (routes/notes.ts,sources/interop.ts, and the regressions) already passes it.identity/subject-identity.ts, ambiguous same-name local subjects storealiasesas an array. Before, aSethid behind a cast tostring[].create_notecarriessuppressedKeywords: [], and the two hand-built evidence-unit responses carryincomplete: false. A cancelled import result statesretryable: true, whichretryableFailure()always returns for a cancellation.Commit 2: client
--lib ES2023,DOM,DOM.Iterable, the Engine client's setting.ambiguousLinkDetails()returns its narrowed shape, theuseInfiniteQuerypages are typed, the scope target list is typedScopeTarget[], andnoteDisplayTitle/noteBodytakePick<LtmNote, ...>. Reads ofexistingNoteIdon a preview sample now checkstatus === "imported"first; pending samples never carry one. An always-truedraft.type !== "source"inside the non-source branch of the memory editor was removed.Commit 3: build
long-term-memory1.4.53 → 1.4.55. 1.4.54 is left for the parallel recall fix (Pasta-Devs/Marinara-Agents#1465 / Pasta-Devs/Marinara-Agents#1467), which is being built at the same time. Whichever PR lands second rebases its version and changelog. The rebuild updates the changelog entry,client.js,server.mjs,manifest.json,artifacts/long-term-memory-1.4.55.zip, and the catalog and notes lanes.MARINARA_ENGINE_ROOTpinned to Marinara Engine staginga2e3f13d8(Pasta-Devs/Marinara-Engine#7799 merge). That commit rebuilds the unchanged 1.4.53 package byte for byte (git statusclean after the rebuild). Theserver.mjsdiff is exactly the runtime items listed above.client.jsalso changes through the narrowing and minifier renames.recall/keyword-index.tsandrecall/retrieval.tsare not touched. The parallel PR is editing them.Package and security impact
long-term-memory>=2.4.1 <4.0.0)Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdThe coding agent ran these checks, not a person. Engine worktree at
a2e3f13d8withpnpm install --frozen-lockfile.tsc6.0.3, Node 24.origin/staging(2a3c37bb2):MARINARA_ENGINE_ROOT=<engine> node scripts/typecheck-packages.mjs long-term-memoryexited 1 with 44 strict errors in server and shared and 29 in client (31 without the ES2023 lib). On this branch it exits 0:no strict errors in 81 server and shared files,no strict errors in 44 client files.value.lengthonstring | undefinedfailed it withTS18048. The probe was then deleted.tsc: the old script in a worktree withoutnode_modulesprinted success and exited 0. The new script exits 1 withCould not run tsc (ENOENT).node scripts/tests/typecheck-packages-missing-tsc.regression.mjspasses on this branch and fails against the old script.npm run check: passes. 0 errors; ESLint warning count on the changed files is unchanged from staging (17).npm run typecheck:packages: passes (prints the strict skip line without an Engine).npx tsx tests/slurp2-typecheck-modules.regression.ts: passes. This is the existing filtered-gate regression.node scripts/test-catalog-lanes.mjs,node scripts/validate-package-locales.mjs,node scripts/validate-package-locale-keys.mjs,node scripts/validate-catalog.mjs,node scripts/tests/catalog-release-notes.regression.mjs,node scripts/tests/catalog-generatedat-determinism.regression.mjs,npm run test:security,git diff --check: all pass.tsx, i.e. the CI list inltm-browser.yml: candidate-reconciliation, conversation-summary-import, debug-log, delta-review, extraction-graph, engine-fields, extraction-reliability, index-keys, local-characters, reconciliation-recall, branch-recall, storage, routes, routes-imports, routes-drafts, routes-scope-identity, routes-backup, runtime, installation, host-styles, andnode tests/long-term-memory-loading.regression.mjs. All pass.node tests/long-term-memory-feedback-clarity-ui.regression.mjs. All pass.long-term-memory-browser.regression.tsfails on macOS at line 4625, where a native<select>ignores ArrowDown and Enter. It fails the same way on unchanged staging, so it is a local platform difference. The Linux CI run of this workflow is the real check.Manual verification notes
Nothing was installed through the Engine UI. Please check:
Documentation impact
Caveat from the issue: an Engine staging dependency bump can turn the strict step red without an Agents change. The browser regression in the same workflow already has this property.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.