Skip to content

fix(cortex): initial ingest tolerates a missing/unreadable vault root#105

Merged
ApiliumDevTeam merged 1 commit into
mainfrom
fix/ingest-missing-vault-root
Jul 3, 2026
Merged

fix(cortex): initial ingest tolerates a missing/unreadable vault root#105
ApiliumDevTeam merged 1 commit into
mainfrom
fix/ingest-missing-vault-root

Conversation

@ApiliumDevTeam

Copy link
Copy Markdown
Contributor

Problem

On macOS, after installing an in-app Akashi update and restarting, the engine died with:

Engine unavailable — initial ingest failed: Internal error: walk error: … /…/akashi/vaults/<hash>/ — No such file or directory (os error 2)

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 ignore walker yields an Err entry that ? turned into a fatal Error::Internal, taking the whole engine down.

Fix

aingle_cortex::service::ingest::ingest_path is now resilient:

  • Missing root → early-return an empty IngestReport with a warn! (engine stays up; a later ingest picks up files once the vault is mounted).
  • Per-entry walk errors and per-file read errors → warn! + continue instead of ? (tolerates iCloud .icloud placeholders and permission errors).

Regression test ingest_missing_path_is_graceful reproduces the crash and passes. All 6 ingest tests green; cargo fmt applied; file is clippy-clean.

Akashi consumes this via a path dep (akashi-core/engine.rs initial_ingest), and its release CI checks out aingle at main, so merging here ships the fix to the next Akashi build.

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.
@ApiliumDevTeam ApiliumDevTeam merged commit 55fc47f into main Jul 3, 2026
11 checks passed
@ApiliumDevTeam ApiliumDevTeam deleted the fix/ingest-missing-vault-root branch July 3, 2026 06:49
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