Skip to content

fix(daemon): guard large root before snapshot restore#2

Merged
ForeverInLaw merged 1 commit into
mainfrom
fix/guard-before-snapshot
Jun 2, 2026
Merged

fix(daemon): guard large root before snapshot restore#2
ForeverInLaw merged 1 commit into
mainfrom
fix/guard-before-snapshot

Conversation

@ForeverInLaw

Copy link
Copy Markdown
Contributor

@

Problem

feat/index-root-guards (#1) added a guard that skips auto-indexing a workspace rooted at a drive root or home directory — but the check ran after the warm-start snapshot restore. A daemon pointed at such a root still read_to_string + serde_json::from_str the existing graph.json first.

Found live: C:\Users\nevermore\.continuum\graph.json had grown to 2.4 GB (129182 home files indexed by a pre-guard build). A 0.1.5 daemon restarted there hangs/OOMs loading that snapshot before the guard fires.

Fix

Hoist unsafe_index_root above the snapshot restore. An oversized root now skips snapshot restore, indexing, and watching alike; the daemon still binds and serves memory + on-demand text search.

Verify

RUST_LOG=info continuum-daemon --workspace C:\Users\nevermore
# WARN  skipping snapshot restore, indexing, and watching: ... is your home directory
# INFO  continuum daemon listening on 127.0.0.1:...

Startup is immediate (~4 ms) — the 2.4 GB graph.json is never read. Confirmed against the real home directory.
@

The guard ran after the warm-start snapshot restore, so a daemon
pointed at a home directory or drive root still loaded a previously
written (and possibly multi-GB) graph.json before bailing — defeating
the OOM protection. Hoist the check above the restore so an oversized
root skips snapshot restore, indexing, and watching alike.
@ForeverInLaw ForeverInLaw merged commit ec4ade4 into main Jun 2, 2026
3 checks passed
@ForeverInLaw ForeverInLaw deleted the fix/guard-before-snapshot branch June 2, 2026 01: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