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

Method isIndexStale

src/index.ts:1192–1196  ·  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

1190 * hint and `codegraph upgrade`'s reminder.
1191 */
1192 isIndexStale(): boolean {
1193 if (this.queries.getLastIndexedAt() == null) return false;
1194 const { extractionVersion } = this.getIndexBuildInfo();
1195 return extractionVersion == null || extractionVersion < EXTRACTION_VERSION;
1196 }
1197
1198 /**
1199 * Extract nodes and edges from source code (without storing)

Callers 2

mainFunction · 0.80
upgrade.test.tsFile · 0.80

Calls 2

getIndexBuildInfoMethod · 0.95
getLastIndexedAtMethod · 0.45

Tested by

no test coverage detected