Skip to content

Fix recursive note imports and large history record scans - #39

Merged
fitchmultz merged 1 commit into
mainfrom
fix/notes-history-streaming
Sep 23, 2026
Merged

fitchmultz merged 1 commit into
mainfrom
fix/notes-history-streaming

Conversation

@fitchmultz

Copy link
Copy Markdown
Owner

Summary

  • Prevent legacy notes migration from importing the shared destination back through a directory symlink, while continuing to import other linked files.
  • Accumulate unfinished JSONL record chunks and join them once, instead of copying and rescanning the growing record for every chunk.

Verification

  • Added a regression covering the reproduced worktree symlink layout: it fails with ENAMETOOLONG before the fix and passes afterward, including notes list/read/write and importing ordinary linked files.
  • Four focused migration/history tests pass, including Unicode separators, multi-chunk records, an unterminated final record, and separate Git-directory layouts.
  • npm ci --ignore-scripts --no-audit and npm run check pass.
  • Runtime tests and the benchmark use the installed Pi fork SDK (e53367c, 0.87.1), through a temporary module resolver; CI qualifies the repository-pinned fork and official-host refusal.
  • Same bounded-setup 64 MiB archived image-data record: history search took 3,493 ms before / 64 ms after; peak process RSS was 963 MiB before / 484 MiB after. These are local measurements, not timing assertions added to the suite.

No new dependencies or settings.

@fitchmultz
fitchmultz merged commit 196ff96 into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant