claude-mem-lite 5.3.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "claude-mem-lite",
13
- "version": "5.3.0",
13
+ "version": "5.3.1",
14
14
  "source": "./",
15
15
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark)."
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark).",
5
5
  "author": {
6
6
  "name": "sdsrss"
@@ -394,6 +394,21 @@ export function cleanupBroken(db, { projectFilter, baseParams, opCap = OP_CAP })
394
394
  -- lesson). Parity with the "lessons never auto-GC" guards in
395
395
  -- decayAndMarkIdle / selectCompressionCandidates / findSmartCompressCandidates.
396
396
  AND (lesson_learned IS NULL OR lesson_learned = '' OR lesson_learned = 'none')
397
+ -- D#4. The one HARD DELETE in this family, and until now the only site whose
398
+ -- exemption from liveObsFilterSql was a LIKELIHOOD argument rather than an
399
+ -- inertness proof: these rows have no title, narrative or lesson, so they are
400
+ -- absent from every injection surface, so an id that was never injected is not one
401
+ -- a #NN cites. Narrow, but reachable -- a hand-typed #NN, or a numeric
402
+ -- "save --supersedes" chain later blanked by a degenerate cluster-merge -- and what
403
+ -- the delete takes with it is the superseded_by that
404
+ -- citation-tracker.redirectSupersededIds (:1363) follows to credit a corrected
405
+ -- memory's #NN to its successor.
406
+ --
407
+ -- Deliberately NOT the full liveObsFilterSql. A retired row whose superseded_by is
408
+ -- null hands that redirect nothing: it falls through to out.add(id) (:1379-1381),
409
+ -- the same answer a missing row produces. Filtering on superseded_at instead would
410
+ -- strand every empty retired row here forever for no gain.
411
+ AND superseded_by IS NULL
397
412
  ${projectFilter} LIMIT ${opCap}
398
413
  `,
399
414
  )
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "claude-mem-lite",
9
- "version": "5.3.0",
9
+ "version": "5.3.1",
10
10
  "os": [
11
11
  "darwin",
12
12
  "linux"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Persistent long-term memory for Claude Code via MCP — captures coding decisions, bugfixes, and context across sessions. Hybrid FTS5 + TF-IDF search with episode batching. Single SQLite DB, no external services. A lighter, lower-cost alternative to claude-mem (episode batching + a smaller model; cost savings are an internal estimate, not a measured benchmark).",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",
@@ -124,12 +124,23 @@ if (!entryArg) {
124
124
 
125
125
  const entryAbs = entryArg.startsWith('/') ? entryArg : join(INSTALL_DIR, entryArg);
126
126
 
127
- // Swap barrier. An auto-update / repair renames files into the install dir one at
128
- // a time — atomic per file, not per file SET — so a hook process that starts
129
- // mid-swap can resolve its entry from the old version and an import from the new
130
- // one. hook-update.mjs marks that window; skip the fire instead of importing a
131
- // mixed module graph. Hooks are best-effort and the swap lasts ~a second, so the
132
- // next fire runs against a settled install.
127
+ // Swap barrier. An auto-update renames files into the install dir one at a time —
128
+ // atomic per file, not per file SET — so a hook process that starts mid-swap can
129
+ // resolve its entry from the old version and an import from the new one.
130
+ // hook-update.mjs marks that window; skip the fire instead of importing a mixed
131
+ // module graph. Hooks are best-effort and the swap lasts ~a second, so the next
132
+ // fire runs against a settled install.
133
+ //
134
+ // This covers the AUTO-UPDATE path only, and the distinction is not pedantic:
135
+ // `hook-update.mjs:719` is the sole writer of this marker in the whole tree (name set,
136
+ // 2026-09-07), so the barrier is never armed for `install.mjs install` — which copies the
137
+ // same file set in place with copyFileSync (`install.mjs:341-350`) and is what
138
+ // `install.mjs repair` ends up executing (`:2388`, after verifying the release). A repair
139
+ // spawned in the background at SessionStart therefore overwrites this tree while hooks
140
+ // keep firing into it. That is R10 P2-12, still open: the mechanism is settled, the runtime
141
+ // symptom is not reproduced, and R10 §8 asks for a repro in tests/sandbox/phaseB-npm.mjs
142
+ // before install()'s main path is touched. An earlier draft of this comment said "auto-update
143
+ // / repair", which reads as though the repair path were already covered — it is not.
133
144
  //
134
145
  // Stale-guarded on BOTH pid and ts: an updater killed mid-swap leaves the marker
135
146
  // behind, and a marker that outlives its writer must never mute hooks permanently.