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

Method runPostExtract

src/resolution/index.ts:642–671  ·  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

640 * state and downstream queries see the updated names.
641 */
642 runPostExtract(): number {
643 let updated = 0;
644 this.clearCaches();
645 for (const fw of this.frameworks) {
646 if (!fw.postExtract) continue;
647 try {
648 const nodes = fw.postExtract(this.context);
649 for (const node of nodes) {
650 this.queries.updateNode(node);
651 updated++;
652 }
653 } catch (err) {
654 logDebug(`Framework '${fw.name}' postExtract failed`, {
655 error: err instanceof Error ? err.message : String(err),
656 });
657 }
658 }
659 for (const fw of this.frameworks) {
660 if (!fw.crossFileNodes) continue;
661 try {
662 updated += this.reconcileCrossFileNodes(fw.crossFileNodes(this.context));
663 } catch (err) {
664 logDebug(`Framework '${fw.name}' crossFileNodes failed`, {
665 error: err instanceof Error ? err.message : String(err),
666 });
667 }
668 }
669 if (updated > 0) this.clearCaches();
670 return updated;
671 }
672
673 /**
674 * 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