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

Method runPostExtract

src/resolution/index.ts:553–582  ·  view source on GitHub ↗

* Run each framework resolver's cross-file finalization pass and persist * the returned node updates. Idempotent — safe to call after every indexAll * and every incremental sync. Returns the number of nodes updated. * * Caches are cleared before/after so the post-extract pass sees fresh

()

Source from the content-addressed store, hash-verified

551 * state and downstream queries see the updated names.
552 */
553 runPostExtract(): number {
554 let updated = 0;
555 this.clearCaches();
556 for (const fw of this.frameworks) {
557 if (!fw.postExtract) continue;
558 try {
559 const nodes = fw.postExtract(this.context);
560 for (const node of nodes) {
561 this.queries.updateNode(node);
562 updated++;
563 }
564 } catch (err) {
565 logDebug(`Framework '${fw.name}' postExtract failed`, {
566 error: err instanceof Error ? err.message : String(err),
567 });
568 }
569 }
570 for (const fw of this.frameworks) {
571 if (!fw.crossFileNodes) continue;
572 try {
573 updated += this.reconcileCrossFileNodes(fw.crossFileNodes(this.context));
574 } catch (err) {
575 logDebug(`Framework '${fw.name}' crossFileNodes failed`, {
576 error: err instanceof Error ? err.message : String(err),
577 });
578 }
579 }
580 if (updated > 0) this.clearCaches();
581 return updated;
582 }
583
584 /**
585 * Bring a framework's cross-file nodes in line with what it wants now:

Callers 2

indexAllMethod · 0.80
syncMethod · 0.80

Calls 6

clearCachesMethod · 0.95
logDebugFunction · 0.90
postExtractMethod · 0.80
updateNodeMethod · 0.80
crossFileNodesMethod · 0.80

Tested by

no test coverage detected