fix(cortex): initial ingest tolerates a missing/unreadable vault root#105
Merged
Conversation
On macOS a post-update restart can race with vault working-copy setup (or an
iCloud vault hasn't synced down), so the ingest root does not exist yet. The
`ignore` walker yielded an Err entry that `?` turned into a fatal
Error::Internal("walk error: ... No such file or directory"), taking the whole
engine down. Now ingest_path early-returns an empty report when the root is
missing, and per-entry walk/read errors warn+continue instead of aborting the
whole ingest (iCloud .icloud placeholders, permission errors). Regression test:
ingest_missing_path_is_graceful.
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.
Problem
On macOS, after installing an in-app Akashi update and restarting, the engine died with:
The post-update restart races with vault working-copy setup (or an iCloud vault hasn't synced down), so the ingest root doesn't exist yet. The
ignorewalker yields anErrentry that?turned into a fatalError::Internal, taking the whole engine down.Fix
aingle_cortex::service::ingest::ingest_pathis now resilient:IngestReportwith awarn!(engine stays up; a later ingest picks up files once the vault is mounted).warn!+continueinstead of?(tolerates iCloud.icloudplaceholders and permission errors).Regression test
ingest_missing_path_is_gracefulreproduces the crash and passes. All 6 ingest tests green;cargo fmtapplied; file is clippy-clean.Akashi consumes this via a path dep (
akashi-core/engine.rsinitial_ingest), and its release CI checks out aingle atmain, so merging here ships the fix to the next Akashi build.