Extraction level code-kb asks for on a new artifact: everything the extractor computes,
including call and variable-reference identifiers, annotations, and source regions.
Cold-start background sweep: checks filesystem against SQLite files records.
Streams disk checks and uses an in-memory SQLite index to eliminate repository-wide heap HashMaps.
Creates a missing index. A git worktree copies its parent repository’s index and
reconciles it against the worktree files, which is much faster than a full scan;
anything else runs a full scan. A copy that another julie-extract wrote is rebuilt.
Tier 2: Just-In-Time Staleness Guard
Checks if a file on disk has been modified since it was indexed in SQLite.
If dirty or missing from index, re-extracts the file synchronously (< 5ms).
Rebuilds the index when it was written by a julie-extract other than the one in use or
at another extraction level. Returns true when a rebuild ran. An index that a newer
julie-extract wrote is kept, so an older binary never replaces it. The rebuild scans a
fresh artifact because the extractor refuses to write into one with an older schema.
True when the index records a julie-extract version or extraction level other than the ones
in use, or holds a file row that another version wrote. A hook checks this before it reads
or writes the index, because the first write would rescan the whole index in place.