Skip to content

fix: scope per-repo lore sync to the repo's own sessions - #40

Merged
franzer merged 4 commits into
mainfrom
fix/per-repo-sync-scope
Jul 1, 2026
Merged

fix: scope per-repo lore sync to the repo's own sessions#40
franzer merged 4 commits into
mainfrom
fix/per-repo-sync-scope

Conversation

@franzer

@franzer franzer commented Jul 1, 2026

Copy link
Copy Markdown
Member

Per-repo lore sync was pushing ALL unsynced sessions into whatever repo it ran in, so sharing one repo's store (repo access + passphrase) exposed the user's reasoning from unrelated projects. On a real machine this was 288 sessions across many private projects versus the 18 actually belonging to the repo.

Fix: lore sync now pushes only sessions whose working directory is the repo root or a subdirectory, using path-boundary matching (so /x/foo does not match /x/foobar) shared with the existing active-session lookup, with LIKE-metacharacter escaping and symlink canonicalization. perform_sync takes the push set from the caller; lore sync status reports the repo-scoped pending count. Inbound merge is unchanged (a teammate's sessions for this repo still pull normally).

Tests: repo-root and nested-subdir included; unrelated and prefix-sibling directories excluded; already-synced excluded; end-to-end assertion that an out-of-scope session is neither stored nor marked synced. Full suite green, clippy -D warnings clean.

@franzer
franzer merged commit 6afe683 into main Jul 1, 2026
5 checks passed
@franzer
franzer deleted the fix/per-repo-sync-scope branch July 1, 2026 13:29
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