Install a background-built callgraph store once its cold build completes.
Mirrors drain_search_index_events: drains the receiver, installs the
freshest store, replays paths that changed during the build, and clears the
receiver. On build failure (channel disconnected with nothing installed) the
receiver is cleared so a later op can retry the cold build.
Drain pre-filtered watcher events and apply cache invalidations on the
dispatch thread. The watcher filter thread owns notify receive/decode,
metadata filtering, ignore matching, root-deleted detection, and path
coalescing; this drain only reacts to compact control events and surviving
paths because the cache/index state below is not Send.
A file the callgraph STORE would have indexed at cold-build time. The store
indexes every file walk_project_files yields (i.e. any detected language),
not just the trigram SOURCE_EXTENSIONS set. Gating the store’s watcher
refresh on the narrower trigram set left edits to Java/C/C++/C#/Kotlin/Ruby/
PHP/… (all of which the store extracts calls for) serving stale results until
a full rebuild. Mirror cold-build exactly so refresh coverage == index
coverage.
A tsconfig.json / jsconfig.json (including variant names like
tsconfig.base.json). A change to any of these can shift TypeScript build
membership (which files tsc checks), so the status-bar membership cache
must be invalidated. Deliberately broad on the variant suffix and ignorant
of extends graphs: the cache is cleared wholesale on a match, and base
configs almost always follow the tsconfig*.json naming. Non-standard base
names are covered on the next tsconfig.json change or configure.