Conversation
… deletion memory and sessions are DB-backed collections whose documents carry synthetic (summary://...) or empty source_path, never real files. Reindex previously walked their nominal filesystem roots as if they held real files; if either root existed and contained even one file, the orphan-deletion pass would delete every indexed document in that collection. Also validates root_path at POST /api/v1/init so an unreadable path is rejected instead of registered as a permanently-empty collection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
memoryandsessionsare DB-backed collections whose documents carry synthetic (summary://...) or emptysource_path, never real files. Incremental reindex previously walked their nominal filesystem roots as if they held real files — if either root existed and contained even one file, the orphan-deletion pass would delete every indexed document in that collection.isLogicalCollection()to skipmemory/sessionsin the reindex walk and orphan-deletion loop, and drops them from the watcher-attach list at init time (matching daemon-startup behavior, which already skips a nonexistent path).POST /api/v1/initnow validatesroot_path(rejects nonexistent/non-directory/unreadable paths with 400) instead of registering a permanently-empty collection.POST /api/v1/collectionsand the rename endpoint now rejectmemory/sessionsas a collection name, closing a name-collision gap found during review: a disk-backed collection created or renamed to one of those reserved names would otherwise be silently skipped by future incremental reindex.Status
This is a WIP snapshot of Group 1+2 from
openspec/changes/fix-install-ux-regressions/tasks.md. Groups 3-8 (CLI init flag parsing, usage-parity test, skill command table, service-install recommendation, npm postinstall diagnostic, CI) are not yet implemented.Test plan
go build ./...go test -race -short ./...— full suite passessessions, root-path validation (nonexistent/file/unreadable/relative), reserved-name rejection on add + rename/simplifypass (4 reviewers: reuse/simplification/efficiency/altitude) applied