mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1466] [Issue]: Long-Term Memory: 75 strict TypeScript errors with no gate, and a typecheck script that passes without tsc #745
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#745
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?
Originally created by @Promansis on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1466
Originally assigned to: @SpicyMarinara, @Promansis on GitHub.
Summary
Long-Term Memory has 44 strict TypeScript errors in its server and shared code and 31 in its client code, and nothing gates them. The server and shared count is the same 44 errors it had at 1.4.8. Three of them point at real failure modes that no current caller reaches. Separately,
scripts/typecheck-packages.mjsreports success whentsccannot be started.Affected package
long-term-memory1.4.53 (upstream/staging2a3c37bb2), andscripts/typecheck-packages.mjs.S=packages/long-term-memory/src/engine/packages/server/src/services/long-term-memoryH=packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memoryC=packages/long-term-memory/src/engine/packages/client/src/features/long-term-memoryExpected behavior
tscwith the Engine's dependency types, and CI keeps them at zero.typecheck-packages.mjsfails when it cannot runtsc.Actual behavior
Server and shared: 44 errors (shared 0).
extractionpersistencesourcesdraftsidentity: LtmModeonDEFAULT_LTM_IMPORTED_SOURCE_MODEatH/constants.ts:9, clears 12. The rest are annotations, literal narrowing and 2–3 small value changes that match what the schema default already produces at runtime.S/extraction/source-extraction.ts:312andS/extraction/candidate-reconciliation.ts:134pass an optionalroottoretrieveLongTermMemory, which needs one. An undefined root reachespath.resolve(undefined)in the vault lock and throwsERR_INVALID_ARG_TYPE. Every production entry point (routes/notes.ts,sources/interop.ts) passesruntime.roottoday.S/identity/subject-identity.ts:658: a cast hides entries whosealiasesis aSet<string>being stored wherestring[]is declared. Today's readers use onlysubject.keyandsourceScope.Client: 31 errors, from about 9 root causes. Narrowing
ambiguousLinkDetails()clears 8, typing theuseInfiniteQuerypages clears 4, the scope and sample unions clear 11, andlibES2023 (the Engine client's setting) clears 2.Flags. Only
strictNullChecks(21 server errors) andnoImplicitAny(2) matter; 21 errors need no strict flag at all. Phasing instrictNullChecksfirst does not help: alone it gives 49.strict: falseis not a usable floor, because zod 3 needsstrictNullChecksfor correctz.infertypes.Script.
typecheck-packages.mjs:100-101treats anyexecFileSyncfailure as compiler output. Whennode_modules/.bin/tscis missing, the error is ENOENT with no stdout or stderr, the output is empty, and the script prints "no syntax errors, undefined names or unresolved modules" and exits 0. CI runsnpm cifirst, so CI is not affected; a fresh worktree is.Steps to reproduce
typecheck-packages.mjs, then link the Engine'snode_modulesinto it so zod, fastify,@types/node, react,@tanstack/react-queryand lucide-react resolve.tsc --noEmit --skipLibCheck --jsx react-jsx --target es2022 --module esnext --moduleResolution bundler --strict --types nodeover the LTM server and shared files, and separately over the client files. Do not filter the diagnostics.node scripts/typecheck-packages.mjs long-term-memoryin a worktree withoutnode_modules. It prints success.Without the Engine's dependency types the same strict run reports 1,015 mostly spurious errors and hides 27 of the 44 real ones.
Minimal fix
Two PRs. Fix to zero, then gate at zero; staging the gate by flag buys nothing.
PR 1: server, shared, script and gate (patch bump)
scripts/typecheck-packages.mjs: fail whentsccannot be spawned (anerror.codesuch as ENOENT, or no output and no exit status).H/constants.ts:9.rootrequired on the two extraction paths, since every caller already passes it, and storealiasesas an array atS/identity/subject-identity.ts:658.typecheck-packages.mjsrather than adding a script. When an Engine root is provided, link itsnode_modulesinto the overlay and, for an opt-in strict-clean package list (long-term-memory first), report every diagnostic unfiltered withtypes: ["node"](about 4 s). Run it in.github/workflows/ltm-browser.yml, which already checks out Engine staging and installs its dependencies (about +10 s).pull-request-checks.ymlhas no Engine checkout.## Unreleased: one bullet for the latent fixes.PR 2: client
tscrun for the client files withlib: ["ES2023", "DOM", "DOM.Iterable"](about 5.5 s).If the gate must land before the fixes: use a checked-in baseline keyed by file, TS code and message, not line numbers (#1464 moved every line). Fail on any new key, and fail when a baselined key disappears without the baseline shrinking. A count-only ratchet would let a new error hide behind a fixed one.
Not included: other packages in
typecheck:packages. They can opt in later.Caveat: an Engine staging dependency bump can turn the gate red without an Agents change, as the browser regression already can.
Regression proof
typecheck-packages.mjsexits non-zero whentscis missing: a small regression that runs it against a tree withoutnode_modules.rootfix is a type change; the existing extraction regressions keep passing.Environment
staging2039583ca)upstream/staging2a3c37bb2); also 1.4.8 (4eee7a26e) for the baselinetsc6.0.3, Node 24.15.0Logs, screenshots, or video
Strict run timing: server and shared 3.4–4.2 s, client 5.0–5.8 s.
Additional context
Tracker item RT-5 (runtime architecture audit, step 7: add a strict
tscjob). The 44-error baseline from 1.4.8 was re-run against 1.4.8 and2a3c37bb2; the errors are identical apart from line numbers and folders after #1464.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Oct 19, 2026):
@Promansis the maintainer asked us to land this for the upcoming release, so both parts are in one PR: Pasta-Devs/Marinara-Agents#1473 (separate commits for the script and server/shared fix and gate, the client fix and second strict run, and the 1.4.55 rebuild).
typecheck-packages.mjsnow fails when tsc exits with no status or prints nothing. A new regression runs it withoutnode_modules.MARINARA_ENGINE_ROOTset, it links the Engine'snode_modulesand runs unfiltered--strict --types nodeover the LTM server and shared files, then over the client files withES2023, DOM, DOM.Iterable.ltm-browser.ymlruns it as its last steps.rootis required on the extraction paths, andaliasesis stored as an array insubject-identity.ts.Built against Engine staging a2e3f13d8, which reproduces 1.4.53 byte for byte.
@SpicyMarinara commented on GitHub (Oct 19, 2026):
Fixed on staging by #1473.