LeanKG icon indicating copy to clipboard operation
LeanKG copied to clipboard

Memory and index follow-ups from the PR #585 review

Open linhdmn opened this issue 2 weeks ago • 0 comments

Found while reviewing #585. Line numbers are at commit 6ae2cc2d.

  • [ ] Redaction rewrites metadata such as document_id and tags (internal/memory/memory.go:425-442, applied at internal/memory/banks.go:674), but RetainReplacing and DeleteDocument match the raw id (banks.go:416,441): deleting sync-token=abc123 deletes 0 rows and reports success.
  • [ ] The core-file size bound checks raw content (internal/memory/memory.go:251,269,306,340) while the file receives the redacted text, which can be longer.
  • [ ] No pattern for a bare LeanKG token (lkg_...) in internal/telemetry/redact.go:14-35.
  • [ ] Bank rows written before redaction do not dedupe against new redacted writes (dedupeBankLocked), and vectors computed from that raw text are kept.
  • [ ] Markdown ownership depends on run order: import docs before index (internal/core/actions.go:732) leaves headings as #slug rows (internal/index/index.go:365-378); the ownership test covers index-first only.
  • [ ] Specialist files written during extraction are not in touched, so a cancelled directory does not roll them back (internal/index/index.go:436). Pre-existing.
  • [ ] docindex walks the disk in a git repository and indexes gitignored markdown, while index is committed-only. Pre-existing.
  • [ ] sessionlink keeps every parsed transcript of a Link pass in memory (internal/sessionlink/reader.go:29-41).

linhdmn avatar Nov 16 '26 07:11 linhdmn