MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isIndexStale

Method isIndexStale

src/index.ts:2317–2321  ·  view source on GitHub ↗

* True when the on-disk index was built by an engine whose extraction is * older than the one now running — i.e. a re-index would add data a migration * can't backfill. False when there's no index yet (nothing to refresh) or the * stamp is current. This is the signal behind `codegraph statu

()

Source from the content-addressed store, hash-verified

2315 * hint and `codegraph upgrade`'s reminder.
2316 */
2317 isIndexStale(): boolean {
2318 if (this.queries.getLastIndexedAt() == null) return false;
2319 const { extractionVersion } = this.getIndexBuildInfo();
2320 return extractionVersion == null || extractionVersion < EXTRACTION_VERSION;
2321 }
2322
2323 /**
2324 * Extract nodes and edges from source code (without storing)

Callers 7

handleStatusMethod · 0.80
buildStatsFunction · 0.80
mainFunction · 0.80
upgrade.test.tsFile · 0.80
indexStateFunction · 0.80

Calls 2

getIndexBuildInfoMethod · 0.95
getLastIndexedAtMethod · 0.45

Tested by 1

indexStateFunction · 0.64